RE

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.zip

Installs 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)
240 chars✓ has a “when” trigger
Intermediate

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

You give it
React application code
You get back
Optimized React application with improved performance

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.lazy or next/dynamic for 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-explorer or bundle-visualizer to find bloat.

Minimize Re-renders (P1)

  • Isolation: Move state as close to its usage as possible. Isolate heavy UI updates.
  • List Performance: Use react-window or react-virtual for virtualization of lists with 500+ items. Wrap list items in React.memo.
  • Context Splitting: Split Context into State and Dispatch objects. This prevents all consumers from re-rendering when only a setter is needed.
  • Stability: Use useMemo for derived list data and passing stable object/array references to children.
  • Content Visibility: content-visibility: auto for off-screen CSS content.
  • Static Hoisting: Extract static objects/JSX outside component scope.
  • Transitions: startTransition for non-urgent UI updates.

Parallelize Computation (P1)

  • Web Workers: Move heavy computation (Encryption, Image processing, Large Data Sorting) off the main thread using Comlink or Worker.

Optimize Server Components (RSC) (P1)

  • Caching: React.cache for 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.

SkillInstallsUpdatedSafetyDifficulty
react-performance (this skill)04moNo flagsIntermediate
nextjs-developer3282moNo flagsAdvanced
frontend-developer274moNo flagsIntermediate
nextjs-app-router-patterns32moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

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.

328531

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.

2782

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.

347

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.

11

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.

00

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.

48105

Search skills

Search the agent skills registry