react-performance
Technical instructions for optimizing React apps by reducing bundle size, fixing data waterfalls, and minimizing unnecessary re-renders.
Install
mkdir -p .claude/skills/react-performance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15260" && unzip -o skill.zip -d .claude/skills/react-performance && rm skill.zipInstalls to .claude/skills/react-performance
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Optimize React rendering, bundle size, and data fetching performance. Use when optimizing React rendering performance, reducing re-renders, or improving bundle size. (triggers: **/*.tsx, **/*.jsx, waterfall, bundle, lazy, suspense, dynamic)Key capabilities
- →Eliminate data waterfalls with parallel fetches
- →Reduce bundle size by avoiding barrel files
- →Lazy load heavy components
- →Minimize re-renders by isolating state
- →Optimize list performance with virtualization
How it works
The skill applies various strategies to optimize React rendering, bundle size, and data fetching, such as parallel data fetching, lazy loading, and state isolation.
Inputs & outputs
When to use react-performance
- →Eliminating sequential data fetch waterfalls
- →Reducing bundle size by removing barrel files and lazy loading
- →Implementing list virtualization for better rendering performance
- →Splitting context providers to minimize component re-renders
About this skill
React Performance
Priority: P0 (CRITICAL)
Strategies to minimize waterfalls, bundle size, and render cost.
Eliminate Data Waterfalls (P0)
- Parallel Data: Use
Promise.all([getUser(), getProducts(), ...])for independent fetches. Avoid sequential awaits (Request Waterfalls). - Preload: Start fetches before render (in event handlers or route loaders).
- Suspense: Use Suspense boundaries to stream partial content and show partial content early.
See implementation examples for parallel fetch with Suspense boundary and lazy loading patterns.
Reduce Bundle Size (P0)
- No Barrel Files: Avoid barrel files (importing from index.ts); import directly from component files to improve tree-shaking.
- Lazy Load: Use
React.lazyornext/dynamicfor heavy components like Charts, * Modals*, or large libraries. - Dependency Reduction: Replace moment with dayjs or lodash with native/radash to drop
bytes. Use
source-map-explorerorbundle-visualizerto find bloat.
Minimize Re-renders (P1)
- Isolation: Move state as close to its usage as possible. Isolate heavy UI updates.
- List Performance: Use
react-windoworreact-virtualfor virtualization of lists with 500+ items. Wrap list items inReact.memo. - Context Splitting: Split Context into
StateandDispatchobjects. This prevents all consumers from re-rendering when only a setter is needed. - Stability: Use
useMemofor derived list data and passing stable object/array references to children. - Content Visibility:
content-visibility: autofor off-screen CSS content. - Static Hoisting: Extract static objects/JSX outside component scope.
- Transitions:
startTransitionfor non-urgent UI updates.
Parallelize Computation (P1)
- Web Workers: Move heavy computation (Encryption, Image processing, Large Data Sorting) off the
main thread using
ComlinkorWorker.
Optimize Server Components (RSC) (P1)
- Caching:
React.cachefor per-request deduplication. - Serialization: Minimize props passing to Client Components (only IDs/primitives).
Anti-Patterns
- No
export *: Breaks tree-shaking. - No Sequential Await: Causes waterfalls.
- No Inline Objects:
style={{}}breaks strict equality checks (if memoized). - No Heavy Libs: Avoid moment/lodash (use dayjs/radash).
References
See references/REFERENCE.md for Profiler usage, bundle analysis, Web Workers, and debounce patterns.
When not to use it
- →When a simple maintenance change is requested
Limitations
- →Heavy scroll animation, pinning, and media effects require browser testing across desktop and mobile viewports before release
- →This skill assumes a frontend project can support GSAP or equivalent animation libraries
How it compares
This skill provides specific React performance optimization techniques like using `Promise.all` for parallel fetches and `React.lazy` for lazy loading, which are more targeted than general code improvements.
Compared to similar skills
react-performance side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| react-performance (this skill) | 0 | 4mo | No flags | Intermediate |
| nextjs-developer | 328 | 2mo | No flags | Advanced |
| frontend-developer | 27 | 4mo | No flags | Intermediate |
| nextjs-app-router-patterns | 3 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by li-lance
View all by li-lance →You might also like
nextjs-developer
zenobi-us
Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications.
frontend-developer
sickn33
Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.
nextjs-app-router-patterns
wshobson
Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Server Components.
bundle-barrel-imports
TheOrcDev
Import directly from source files instead of barrel files. Apply when using libraries like lucide-react, @mui/material, or @radix-ui/react-* to reduce bundle size and improve dev boot time.
senior-frontend
FISCFED9
Frontend development skill for React, Next.js, TypeScript, and Tailwind CSS applications. Use when building React components, optimizing Next.js performance, analyzing bundle sizes, scaffolding frontend projects, implementing accessibility, or reviewing frontend code quality.
landing-page-guide-v2
bear2u
Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.