react-performance

Diagnose React rerender cost and apply measured memoization, virtualization, and code-splitting fixes.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/TierOne-Studio/spa-velocity --skill react-performance-tierone-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-performance
Source: https://github.com/TierOne-Studio/spa-velocity/tree/main/.ruler/skills/react-performance
Command: npx skills add https://github.com/TierOne-Studio/spa-velocity --skill react-performance-tierone-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React apps slow down through excessive rerenders, oversized lists, bloated initial bundles, and misapplied memoization. This Skill enforces a measurement-first discipline so you fix real bottlenecks instead of scattering premature useMemo and React.memo calls that add overhead without benefit. ## Core Features & Use Cases - Measurement-first diagnosis: Use Profiler, console.time, performance.mark, DevTools, and Lighthouse to quantify rerender cost and Core Web Vitals before changing code. - Memoization decision rules: Apply React.memo, useMemo, and useCallback only when computation is expensive AND identity stability matters downstream, avoiding net-loss optimizations. - Concrete optimization patterns: Virtualize long lists with @tanstack/react-virtual, code-split heavy routes with React.lazy and <Suspense>, lazy-load below-the-fold widgets, and narrow frequently-changing context. - Use Case: A dashboard with a 500-row table feels laggy. Profile the render, virtualize the list, stabilize row props and keys, and verify the improvement with a second profile. ## Quick Start Profile this slow React component and tell me which rerenders to eliminate and whether any memoization is actually justified.

Frequently Asked Questions about react-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what is causing slow rerenders in React?

Use the React DevTools Profiler to record a session and inspect which components rerender and how long each commit takes. Supplement with console.time, performance.mark, and Lighthouse for Core Web Vitals before changing any code.

When should I use useMemo or useCallback in React?

Use them only when the computed value is genuinely expensive AND a downstream dependency array or memoized component relies on identity stability. Memoizing cheap values like useMemo(() => x + 1, [x]) is slower than recomputing.

How do I speed up a long list in React?

Virtualize lists over roughly 100 visible items with @tanstack/react-virtual so only the visible slice renders. Ensure stable keys, stable callbacks, and stable item data so memoized rows actually skip rerenders.

Why does React.memo not prevent my component from rerendering?

React.memo fails when props change identity every render, such as freshly created objects, inline callbacks, or index-based keys. The equality check runs, fails, and the component rerenders anyway, making the memo a net loss.

When should I not optimize React performance?

Do not optimize without a measurement. If nothing is measurably slow via Profiler, DevTools, or user-reported jank, adding memoization is premature optimization that adds work, memory cost, and obscures real bottlenecks.