Skip to main content
ZICQ

Skills ZICQ category:Agent Workflows react-component-performance

React Component Performance

Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations). Use when asked to profile or improve a React component, reduce re-renders, or speed up UI updates in React apps.

1027 installs

Official URL:skills.sh

What this skill does

Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.

What it does

Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations)

When to use it

asked to profile or improve a React component, reduce re-renders, or speed up UI updates in React apps

How agents load it

Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: React Component Performance; Overview; Workflow; Checklist; Optimization Patterns; Isolate ticking state. It includes spec-recommended sections: step-by-step instructions, input/output examples.

File analysis

File analysis: besides SKILL.md, the body references references/examples.md. Those resources load on demand.

React Component PerformanceOverviewWorkflowChecklistOptimization PatternsIsolate ticking stateStabilize callbacks with `useCallback` + `memo`Prefer derived data outside renderAdditional patternsProfiling Validation StepsExample Reference

Source category:skills.sh agent-skill

SKILL.md & Agent activation

Official spec ↗
name
react-component-performance
description
Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations). Use when asked to profile or improve a React component, reduce re-renders, or speed up UI updates in React apps.
  1. DiscoverThe client exposes names and descriptions to the agent.
  2. ActivateYour request or the task context selects the skill and loads its instructions.
  3. Load resourcesReferenced scripts, documentation and assets are used when needed.
Files referenced by the instructions · 1
  • references/examples.md

These paths are extracted from the text. Check the upstream package to verify the files exist.

Invocation syntax and available tools depend on your Agent client. Client integration guide ↗

Install this skill

Skills CLI ↗

Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.

This skill references supporting files. Retrieve the complete directory from the source; copying SKILL.md alone may leave missing dependencies.

Ask your Agent to install

Copy these instructions to a compatible agent and confirm the target directory matches your client.

Install the agent skill "react-component-performance" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-d2da9a8158bd6484-React-Component-Performance.html
Save it as .cursor/skills/react-component-performance/SKILL.md or .claude/skills/react-component-performance/SKILL.md and keep the frontmatter name and description exactly as-is.
This skill also ships scripts/, references/, or assets/ — fetch the whole folder from https://github.com/dimillian/skills instead of creating only a SKILL.md.

Full package on GitHub ↗

Install from the terminal · Skills CLI

Requires Node.js and npx. First inspect the repository's skill list to confirm the name.

npx skills add 'https://github.com/dimillian/skills' --list

npx skills add 'https://github.com/dimillian/skills' --skill 'react-component-performance'

The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.

Readable layout
--- name: react-component-performance description: Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations). Use when asked to profile or improve a React component, reduce re-renders, or speed up UI updates in React apps. --- # React Component Performance ## Overview Identify render hotspots, isolate expensive updates, and apply targeted optimizations without changing UI behavior. ## 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. ## Optimization Patterns ### Isolate ticking state Move a timer or animation counter into a child so the parent list never re-renders on each tick. ```tsx // ❌ Before – entire parent (and list) re-renders every second function Dashboard({ items }: { items: Item[] }) { const [tick, setTick] = useState(0); useEffect(() => { const id = setInterval(() => setTick(t => t + 1), 1000); return () => clearInterval(id); }, []); return ( <> {/* re-renders every second */} ); } // ✅ After – only re-renders; list is untouched function Clock() { const [tick, setTick] = useState(0); useEffect(() => { const id = setInterval(() => setTick(t => t + 1), 1000); return () => clearInterval(id); }, []); return {tick}s; } function Dashboard({ items }: { items: Item[] }) { return ( <> ); } ``` ### Stabilize callbacks with `useCallback` + `memo` ```tsx // ❌ Before – new handler reference on every render busts Row memo function List({ items }: { items: Item[] }) { const handleClick = (id: string) => console.log(id); // new ref each render return items.map(item => ); } // ✅ After – stable handler; Row only re-renders when its own item changes const Row = memo(({ item, onClick }: RowProps) => (
  • onClick(item.id)}>{item.name}
  • )); function List({ items }: { items: Item[] }) { const handleClick = useCallback((id: string) => console.log(id), []); return items.map(item => ); } ``` ### Prefer derived data outside render ```tsx // ❌ Before – recomputes on every render function Summary({ orders }: { orders: Order[] }) { const total = orders.reduce((sum, o) => sum + o.amount, 0); // runs every render return

    Total: {total}

    ; } // ✅ After – recomputes only when orders changes function Summary({ orders }: { orders: Order[] }) { const total = useMemo(() => orders.reduce((sum, o) => sum + o.amount, 0), [orders]); return

    Total: {total}

    ; } ``` ### Additional patterns - **Split rows**: extract list rows into memoized components with narrow props. - **Defer heavy rendering**: lazy-render or collapse expensive content until expanded. ## Profiling Validation Steps 1. Open **React DevTools → Profiler** tab. 2. Click **Record**, perform the slow interaction, then **Stop**. 3. Switch to **Flamegraph** view; any bar labeled with a component and time > ~16 ms is a candidate. 4. Use **Ranked chart** to sort by self render time and target the top offenders. 5. Apply one optimization at a time, re-record, and compare render counts and durations against the baseline. ## Example Reference Load `references/examples.md` when the user wants a concrete refactor example.

    Related skills

    Agent Workflows

    Skill Creator

    Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that exte…

    Agent Workflows

    Clawdhub

    Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fl…

    Agent Workflows

    Agent Team Orchestration

    Orchestrate multi-agent teams with defined roles, task lifecycles, handoff protocols, and review workflows. Use when: (1) Setting up a team …

    Agent Workflows

    Superpowers

    Spec-first, TDD, subagent-driven software development workflow. Use when: (1) building any new feature or app — triggers brainstorm → plan →…