react-performance
Skill3 starsChanged 8 months agoMITView on GitHub
Use when optimizing React component rendering, fixing Core Web Vitals (LCP, INP, CLS), reducing bundle size, diagnosing re-renders, code splitting, memoization decisions, Server Component patterns, or profiling React apps. Covers React 19, React Compiler, useTransition, useDeferredValue, Suspense, and Next.js optimization.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- jscott3201/yet-more-skillstheir own version, first seen Sep 7, 2026
- socialadsmentor/sam-agentic-harnesstheir own version, first seen Sep 3, 2026
- Evan-Kim2028/agent-skillstheir own version, first seen Aug 16, 2026
- SamuelNDCE/claude-super-skill-librarytheir own version, first seen Aug 1, 2026
- JunMystery/Agent-Guidance-Pythontheir own version, first seen Jul 21, 2026
Used with
Projects with it also use vite-patterns, react-testing and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
aragaobrunoSkillvite-patterns
Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.
Also in 3 projects that use this
SentrySkillreact-testing
Write and review React/TypeScript tests for Sentry's frontend using Jest and React Testing Library. Use when adding or editing tests in static/ (*.spec.tsx), writing component/hook tests, mocking API responses with MockApiClient, testing routing or network requests, or when asked to "write a frontend test", "add a React test", "test this component", or "fix a flaky RTL test".
Also in 4 projects that use this
joneqianSkillpostgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
Also in 3 projects that use this
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 3 projects that use this
LangChainSkilldocker-patterns
Best practices for Docker containerization and multi-stage builds
Also in 3 projects that use this
mryeastcodeSkillcontext-budget
Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- templetongroup/radiant★ 113same name
- s-hiraoku/synapse-a2a★ 16same name
- wpank/ai★ 11same name
- jgamaraalv/delivery-loop★ 4same name
- jscott3201/yet-more-skills★ 4same name
- socialadsmentor/sam-agentic-harness★ 4same name
- aragaobruno/monster-antigravity★ 2same name
- JunMystery/Agent-Guidance-Python★ 2same name
- Evan-Kim2028/agent-skills★ 1same name
- Nupke/react-claude-skills★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- api-securitySkill
- nextjs-app-routerSkill
- product-marketingSkill
- seoSkill
- ux-copySkill
- wcag-accessibilitySkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 126
Manual memo/useMemo/useCallback: only as escape hatches when the compiler is insufficient
- Distinctive: line 130
When reviewing code, watch for these performance killers:
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Performance
Comprehensive React performance guidance covering measurement, rendering optimization, bundle size, Core Web Vitals, and Server Component patterns. Verified against React docs and Web Vitals specifications.
First principle: Measure before you optimize. This skill teaches you to find problems before fixing them.
Architecture Overview
[Diagnose]
├── React DevTools Profiler (component render times)
├── Chrome Performance Panel (main thread activity)
├── web-vitals library (LCP, INP, CLS in production)
└── Bundle analyzer (what's in the bundle)
↓
[Identify Root Cause]
├── Unnecessary re-renders? → Memoization / state colocation
├── Slow initial load? → Code splitting / Server Components
├── Janky interactions? → useTransition / useDeferredValue
├── Layout shifts? → Image/font optimization
└── Large bundle? → Dynamic imports / tree shaking
↓
[Fix — Least Invasive First]
├── 1. Restructure components (children pattern, local state)
├── 2. Enable React Compiler (auto-memoization)
├── 3. Use concurrent features (transitions, deferred values)
├── 4. Move work to Server Components
├── 5. Code split heavy dependencies
└── 6. Manual memo/useMemo/useCallback (last resort)Quick Reference
| Need to... | See |
| Measure performance before optimizing | Profiling and Measurement |
| Fix unnecessary re-renders | Rendering Optimization |
| Reduce JavaScript bundle size | Bundle Optimization |
| Fix LCP, INP, or CLS scores | Core Web Vitals |
| Decide Server vs Client Components | Server Components |
| Handle large lists and data sets | Data and Lists |
| Optimize images, fonts, and media | Assets |
| Decide when React Compiler handles it | React Compiler |
Decision Matrix: Which Optimization?
"My page loads slowly"
| Symptom | Likely Cause | Fix | Resource |
| LCP > 2.5s, large image | Unoptimized hero image | next/image with priority | assets |
| LCP > 2.5s, text content | Render-blocking JS | Server Components, code split | server-components, bundle |
| LCP > 2.5s, font flash | Font loading delay | next/font | assets |
| TTFB > 800ms | Slow data fetching | Parallel fetches, streaming | server-components |
| Large JS bundle (> 200KB) | Too much client code | Dynamic imports, tree shaking | bundle |
"My page feels janky/unresponsive"
| Symptom | Likely Cause | Fix | Resource |
| INP > 200ms on typing | Heavy re-renders on input | useTransition, state colocation | rendering |
| INP > 200ms on click | Expensive event handler | startTransition, requestIdleCallback | rendering |
| INP > 200ms on navigation | Route transition re-renders | useTransition for navigation | rendering |
| Scrolling stutter | Large list rendering | Virtualization | data-and-lists |
| Input lag | Context re-rendering entire tree | Split context, selector pattern | rendering |
"Layout is jumping around"
| Symptom | Likely Cause | Fix | Resource |
| CLS > 0.1, images | Missing width/height | next/image or explicit dimensions | assets, web-vitals |
| CLS > 0.1, fonts | Font swap | next/font | assets |
| CLS > 0.1, dynamic content | Content inserted after load | Reserve space, Suspense fallback | web-vitals |
| CLS > 0.1, animations | Layout-triggering CSS | Use transform instead of top/left | web-vitals |
"Should I use memo/useMemo/useCallback?"
Is React Compiler enabled?
├── YES → Don't add manual memoization. Compiler handles it.
└── NO
├── Have you measured with Profiler?
│ ├── NO → Measure first. The problem might not be re-renders.
│ └── YES, renders are slow (> 1ms per component)
│ ├── Can you restructure? (children pattern, local state)
│ │ ├── YES → Do that instead. No memo needed.
│ │ └── NO → Use memo/useMemo/useCallback.
│ └── Is the child already wrapped in memo()?
│ ├── NO → Wrapping parent's callback in useCallback alone does nothing.
│ └── YES → useCallback/useMemo will help.
└── Can you enable React Compiler?
├── YES → Enable it. Remove manual memoization later.
└── NO → Use memo/useMemo/useCallback where Profiler shows benefit.The Optimization Hierarchy
The React team's official priority order:
- Write correct code first — fix bugs, don't mask them with memoization
- Structure components well — local state, children pattern, avoid unnecessary Effects
- Measure before optimizing — use Profiler, console.time, CPU throttling in production builds
- Adopt React Compiler — handles memo/useMemo/useCallback automatically
- Use concurrent features (useTransition, useDeferredValue, Suspense) for responsiveness
- Use Server Components to eliminate client bundle weight and fetch waterfalls
- Manual memo/useMemo/useCallback only as escape hatches when the compiler is insufficient
Anti-Patterns Checklist
When reviewing code, watch for these performance killers:
- Effect chains —
useEffectthat sets state triggering anotheruseEffect(derive during render instead) - Inline object/function props to
memo()-wrapped children (defeats memoization) - State too high — input state at page level re-rendering entire tree
useEffectfor derived state —setFiltered(items.filter(...))in effect (useuseMemoor calculate during render)- Missing
keyprop — or using array index as key for dynamic lists - Context monolith — one Provider with user + theme + cart + notifications
- Client Component boundary too high —
'use client'at layout/page level instead of leaf components - Heavy imports in client bundle — syntax highlighters, markdown parsers, date libraries not code-split
- Images without dimensions — causes CLS
onPaste={e => e.preventDefault()}on password fields — blocks password managers (also an a11y violation)- Manual memo/useMemo/useCallback without measuring first — adds complexity for no proven benefit
new ExpensiveThing()inuseRefinitializer — runs every render (use lazy init pattern)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

