Skill · em Construir interface
react-component-performance
Diagnose slow React components and suggest targeted performance fixes.
Procedência
- Origem: davila7/claude-code-templates
- Caminho:
cli-tool/components/skills/web-development/react-component-performance - Versão fixada:
57f899e5394bb8ca166f38eacae8f0853cbfe033 - Licença: MIT
- Espelhado em 25/09/2026
- 4 downloads no Claude Code Templates (lido em 25/09/2026)
Antes de instalar
3 arquivos · 7,2 KB · só texto, nenhum script
Instalar na sua CLI
O comando baixa a versão fixada (commit 57f899e) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.
Claude Code
Neste projeto: instala em .claude/skills/react-component-performance/.
d=".claude/skills/react-component-performance" u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/web-development/react-component-performance" curl -fsSL --create-dirs \ -o "$d/SKILL.md" "$u/SKILL.md" \ -o "$d/agents/openai.yaml" "$u/agents/openai.yaml" \ -o "$d/references/examples.md" "$u/references/examples.md" \ -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"
Global: instala em ~/.claude/skills/react-component-performance/.
d="$HOME/.claude/skills/react-component-performance" u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/web-development/react-component-performance" curl -fsSL --create-dirs \ -o "$d/SKILL.md" "$u/SKILL.md" \ -o "$d/agents/openai.yaml" "$u/agents/openai.yaml" \ -o "$d/references/examples.md" "$u/references/examples.md" \ -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"
Codex
Neste projeto: instala em .agents/skills/react-component-performance/.
d=".agents/skills/react-component-performance" u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/web-development/react-component-performance" curl -fsSL --create-dirs \ -o "$d/SKILL.md" "$u/SKILL.md" \ -o "$d/agents/openai.yaml" "$u/agents/openai.yaml" \ -o "$d/references/examples.md" "$u/references/examples.md" \ -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"
Global: instala em ~/.agents/skills/react-component-performance/.
d="$HOME/.agents/skills/react-component-performance" u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/web-development/react-component-performance" curl -fsSL --create-dirs \ -o "$d/SKILL.md" "$u/SKILL.md" \ -o "$d/agents/openai.yaml" "$u/agents/openai.yaml" \ -o "$d/references/examples.md" "$u/references/examples.md" \ -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"
Antigravity
Neste projeto: instala em .agents/skills/react-component-performance/.
d=".agents/skills/react-component-performance" u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/web-development/react-component-performance" curl -fsSL --create-dirs \ -o "$d/SKILL.md" "$u/SKILL.md" \ -o "$d/agents/openai.yaml" "$u/agents/openai.yaml" \ -o "$d/references/examples.md" "$u/references/examples.md" \ -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"
Global: instala em ~/.gemini/antigravity-cli/skills/react-component-performance/.
d="$HOME/.gemini/antigravity-cli/skills/react-component-performance" u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/web-development/react-component-performance" curl -fsSL --create-dirs \ -o "$d/SKILL.md" "$u/SKILL.md" \ -o "$d/agents/openai.yaml" "$u/agents/openai.yaml" \ -o "$d/references/examples.md" "$u/references/examples.md" \ -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"
Peça ao Rook
Já usa o Rook Labs? Cole no chat do Rook: instale a skill https://rooklabs.sh/marketplace/cct.react-component-performance
Prévia do SKILL.md
---
name: react-component-performance
description: Diagnose slow React components and suggest targeted performance fixes.
risk: safe
source: "Dimillian/Skills (MIT)"
date_added: "2026-03-25"
---
# React Component Performance
## Overview
Identify render hotspots, isolate expensive updates, and apply targeted optimizations without changing UI behavior.
## When to Use
- When the user asks to profile or improve a slow React component.
- When you need to reduce re-renders, list lag, or expensive render work in React UI.
## Workflow
1. Reproduce or describe the slowdown.
2. Identify what triggers re-renders (state updates, props churn, effects).
3. Isolate fast-changing state from heavy subtrees.
4. Stabilize props and handlers; memoize where it pays off.
5. Reduce expensive work (computation, DOM size, list length).
6. **Validate**: open React DevTools Profiler → record the interaction → inspect the Flamegraph for components rendering longer than ~16 ms → compare against a pre-optimization baseline recording.
## Checklist
- Measure: use React DevTools Profiler or log renders; capture baseline.
- Find churn: identify state updated on a timer, scroll, input, or animation.
- Split: move ticking state into a child; keep heavy lists static.
- Memoize: wrap leaf rows with `memo` only when props are stable.
- Stabilize props: use `useCallback`/`useMemo` for handlers and derived values.
- Avoid derived work in render: precompute, or compute inside memoized helpers.
- Control list size: window/virtualize long lists; avoid rendering hidden items.
- Keys: ensure stable keys; avoid index when order can change.
- Effects: verify dependency arrays; avoid effects that re-run on every render.
- Style/layout: watch for expensive layout thrash or large Markdown/diff renders.
…