react-performance-patterns

Optimize React applications using memoization, code splitting, and virtualization.

1|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/anaghkanungo7/agent-skills --skill react-performance-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-performance-patterns
Source: https://github.com/anaghkanungo7/agent-skills/tree/main/react-performance-patterns
Command: npx skills add https://github.com/anaghkanungo7/agent-skills --skill react-performance-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps AI agents guide developers to identify and fix React performance bottlenecks, delivering faster, smoother user experiences.

Core Features & Use Cases

  • Profiling & measurement: use React DevTools Profiler, Chrome Performance, and Lighthouse to locate render bottlenecks.
  • Rendering optimization: apply React.memo, useMemo, and useCallback to reduce unnecessary rerenders in lists and high-frequency components.
  • Code splitting & virtualization: leverage dynamic imports and virtualization (react-window) to shrink initial load and improve scroll performance.
  • Context optimization: structure contexts to minimize re-renders through selective subscriptions and memoized values.

Use Case: Optimize a dashboard by profiling, memoizing expensive components, splitting code, and virtualization to handle large data sets.

Quick Start

Start by profiling a sample component with React DevTools to locate the top bottleneck, then apply memoization and code splitting to reduce render counts and bundle size, finally verify improvements with Core Web Vitals.

Frequently Asked Questions about react-performance-patterns

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

FAQPage Schema
How do I optimize React performance and reduce unnecessary component rerenders?

Optimize React performance by profiling with React DevTools to locate bottlenecks, then apply React.memo, useMemo, and useCallback to prevent unnecessary rerenders in lists and high-frequency components.

What's the best way to handle long lists and improve scroll performance in React?

Handle long lists and improve scroll performance by applying virtualization with react-window, which renders only visible items, reducing DOM nodes and improving UI responsiveness for large data sets.

How do I shrink the initial bundle size and speed up load times in a React app?

Shrink initial bundle size and speed up load times by applying code splitting with dynamic imports, loading components only when needed to improve Core Web Vitals and overall UI responsiveness.

Why does my React Context cause widespread rerenders and how can I fix it?

React Context causes rerenders when its value updates, triggering all consumers; fix this by structuring contexts with selective subscriptions and memoized values to isolate and minimize re-renders.

When should I not use memoization for component rendering in React?

Avoid memoization when the component render is cheap or props change frequently, as the overhead of React.memo, useMemo, or useCallback can outweigh performance gains; always profile first to verify bottlenecks.

Can I use these React performance patterns in a Next.js application?

Yes, these performance patterns apply across React, Next.js, and related ecosystems, supporting component rendering, bundle sizing, and UI responsiveness improvements tracked via Core Web Vitals.