react-performance

Diagnose and fix React and Next.js performance issues across waterfalls, bundles, and re-renders.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React and Next.js apps often feel slow for reasons developers misdiagnose — memoizing components while a request waterfall dominates load time, or shipping barrel imports that bloat the client bundle. This Skill provides a priority-ordered checklist of the seven categories that actually cause slowness, so optimization effort goes where it matters. ## Core Features & Use Cases - Priority-ordered diagnosis: Seven ranked categories from request waterfalls and bundle size down to hot-loop JavaScript, mapped to Core Web Vitals (LCP, INP, CLS, TBT). - Concrete fix patterns: Parallelizing sequential awaits with Promise.all, splitting Server Components for parallel rendering, direct imports over barrels, React.cache() deduplication, and correct memoization discipline. - Review red flags: A stop-list for code review — unauthorized Server Actions, mutable module-level server state, index keys on reorderable lists, and hand-written memoization under React Compiler. - Use Case: A Next.js page loads slowly. You find three sequential awaits in a Server Component, convert them to Promise.all, split sibling fetches into child components, and defer a third-party chat script — cutting LCP without touching a single useMemo. ## Quick Start Ask the AI to review a slow React or Next.js page or component for performance problems using the react-performance priority checklist.

Frequently Asked Questions about react-performance

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

FAQPage Schema
How do I fix slow React or Next.js page loads?▼

Start with request waterfalls, not memoization. Sequential awaits on independent data each add a full round trip — combine them with Promise.all or split them into sibling Server Components so React renders them in parallel.

When should I use useMemo, useCallback, or React.memo?▼

Only when a component re-renders often, its props are usually equal, and its render is measurably expensive. Memoization adds an equality check per render, so without a profile it is pure overhead — and in React Compiler projects it is noise.

How do I reduce Next.js bundle size?▼

Import directly from module paths instead of barrel index files, enable optimizePackageImports, dynamic-import heavy client-only components with next/dynamic, and defer third-party scripts to afterInteractive or lazyOnload.

Why are my Server Components fetching data slowly?▼

Sibling awaits inside one Server Component run sequentially. Split them into separate child components so React renders them in parallel, and use React.cache() to deduplicate repeated calls within one request.

Does this skill measure performance or run benchmarks?▼

No. It explicitly does not produce measurements — that belongs to a separate measuring-performance skill. This skill tells you where to look and what to fix once you have a profile or a slow page.

What are the biggest React performance red flags in code review?▼

Sequential awaits on independent data, barrel imports in client-shipped routes, Server Actions without authorization checks, mutable module-level server state, array index keys on reorderable lists, and unprofiled useMemo.