react-performance

Optimizes React render performance using memoization, code splitting, and list virtualization.

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/arayaroma/ether --skill react-performance-arayaroma
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-performance
Source: https://github.com/arayaroma/ether/tree/main/skills/react-performance
Command: npx skills add https://github.com/arayaroma/ether --skill react-performance-arayaroma

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React applications often suffer from unnecessary re-renders, oversized bundles, and slow rendering of long lists. This Skill provides concrete patterns for diagnosing and fixing these performance problems with memoization, lazy loading, and virtualization. ## Core Features & Use Cases - Memoization guidance: Apply useMemo, useCallback, and React.memo only where they earn their cost, with correct patterns like copying arrays before sorting. - Code splitting: Split heavy or below-the-fold components (charts, 3D scenes, rich text editors) with React.lazy and Suspense to shrink initial bundles. - List virtualization: Render lists of 100+ DOM-heavy rows efficiently with @tanstack/react-virtual. - Use Case: A dashboard page re-renders an entire market list on every keystroke. Profile with React DevTools, stabilize callbacks with useCallback, memoize row components with React.memo, and virtualize the list once it exceeds a few hundred rows. ## Quick Start Ask the assistant to review a slow React component and apply the appropriate memoization, code-splitting, or virtualization pattern from this Skill.

Frequently Asked Questions about react-performance

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

FAQPage Schema
How do I stop a React component from re-rendering too often?▼

Profile first with React DevTools Profiler to find the actual slow component. Then stabilize props and callbacks with useCallback, wrap pure presentational components in React.memo, and memoize genuinely expensive computations with useMemo.

When should I use useMemo and useCallback in React?▼

Use useMemo only for genuinely expensive computations like sorting or filtering large arrays, and useCallback for functions passed as props to memoized child components. Both have their own comparison cost, so profile before adding them rather than applying them by default.

How do I reduce React bundle size with code splitting?▼

Use React.lazy with dynamic import() and wrap the component in Suspense with a fallback. Split at routes and at heavy, below-the-fold, or conditionally rendered components like charts, 3D scenes, and rich text editors, not at every small component.

When should I virtualize a list in React?▼

Virtualize once a list regularly renders more than roughly 100-200 DOM-heavy rows. Below that threshold, a plain .map() is simpler and fast enough. The Skill uses useVirtualizer from @tanstack/react-virtual with an estimated row size and overscan.

Why does Array.prototype.sort cause bugs inside useMemo?▼

Array.prototype.sort mutates the array in place, which can corrupt state or props shared elsewhere. Copy the array first with the spread operator, for example [...markets].sort(...), before sorting inside the memoized computation.