Skip to main content
ZICQ

Skills ZICQ category:Data & Analysis react-performance-optimization

React Performance Optimization

React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.

1900 installs

Official URL:skills.sh

What this skill does

Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.

What it does

React performance optimization patterns using memoization, code splitting, and efficient rendering strategies

When to use it

This Skill

How agents load it

Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: React Performance Optimization; When to Use This Skill; Core Concepts; React Rendering Optimization; When to Optimize; Quick Reference. It includes spec-recommended sections: step-by-step instructions.

File analysis

File analysis: besides SKILL.md, the body references references/memoization.md, references/code-splitting.md, references/virtualization.md, references/state-management.md, references/concurrent-features.md, references/profiling-debugging.md. Those resources load on demand.

React Performance OptimizationWhen to Use This SkillCore ConceptsReact Rendering OptimizationWhen to OptimizeQuick ReferenceOptimization Workflow1. Identify BottlenecksOpen React DevTools ProfilerRecord interaction → Analyze flame graph → Find slow components2. Apply Targeted Optimizations3. Verify Improvements

Source category:skills.sh agent-skill

SKILL.md & Agent activation

Official spec ↗
name
react-performance-optimization
description
React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.
  1. DiscoverThe client exposes names and descriptions to the agent.
  2. ActivateYour request or the task context selects the skill and loads its instructions.
  3. Load resourcesReferenced scripts, documentation and assets are used when needed.
Files referenced by the instructions · 7
  • references/memoization.md
  • references/code-splitting.md
  • references/virtualization.md
  • references/state-management.md
  • references/concurrent-features.md
  • references/profiling-debugging.md
  • references/common-pitfalls.md

These paths are extracted from the text. Check the upstream package to verify the files exist.

Invocation syntax and available tools depend on your Agent client. Client integration guide ↗

Install this skill

Skills CLI ↗

Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.

This skill references supporting files. Retrieve the complete directory from the source; copying SKILL.md alone may leave missing dependencies.

Ask your Agent to install

Copy these instructions to a compatible agent and confirm the target directory matches your client.

Install the agent skill "react-performance-optimization" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-b470937bb8796fad-React-Performance-Optimization.html
Save it as .cursor/skills/react-performance-optimization/SKILL.md or .claude/skills/react-performance-optimization/SKILL.md and keep the frontmatter name and description exactly as-is.
This skill also ships scripts/, references/, or assets/ — fetch the whole folder from https://github.com/nickcrew/claude-cortex instead of creating only a SKILL.md.

Full package on GitHub ↗

Install from the terminal · Skills CLI

Requires Node.js and npx. First inspect the repository's skill list to confirm the name.

npx skills add 'https://github.com/nickcrew/claude-cortex' --list

npx skills add 'https://github.com/nickcrew/claude-cortex' --skill 'react-performance-optimization'

The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.

Readable layout
--- name: react-performance-optimization description: React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets. keywords: - React optimization - React performance - React.memo - bundle size - code splitting - lazy loading - re-render - useCallback - useMemo - virtualization file_patterns: - '**/*.spec.ts' - '**/*.test.ts' - '**/*.test.tsx' - '**/*.ts' - '**/*.tsx' - '**/package.json' - '**/tests/**/*.ts' - '**/tests/**/*.tsx' - '**/tsconfig.json' confidence: 0.76 --- # React Performance Optimization Expert guidance for optimizing React application performance through memoization, code splitting, virtualization, and efficient rendering strategies. ## When to Use This Skill - Optimizing slow-rendering React components - Reducing bundle size for faster initial load times - Improving responsiveness for large lists or data tables - Preventing unnecessary re-renders in complex component trees - Optimizing state management to reduce render cascades - Improving perceived performance with code splitting - Debugging performance issues with React DevTools Profiler ## Core Concepts ### React Rendering Optimization React re-renders components when props or state change. Unnecessary re-renders waste CPU cycles and degrade user experience. Key optimization techniques: - **Memoization**: Cache component renders and computed values - **Code splitting**: Load code on demand for faster initial loads - **Virtualization**: Render only visible list items - **State optimization**: Structure state to minimize render cascades ### When to Optimize 1. **Profile first**: Use React DevTools Profiler to identify actual bottlenecks 2. **Measure impact**: Verify optimization improves performance 3. **Avoid premature optimization**: Don't optimize fast components ## Quick Reference Load detailed patterns and examples as needed: | Topic | Reference File | | --- | --- | | React.memo, useMemo, useCallback patterns | `skills/react-performance-optimization/references/memoization.md` | | Code splitting with lazy/Suspense, bundle optimization | `skills/react-performance-optimization/references/code-splitting.md` | | Virtualization for large lists (react-window) | `skills/react-performance-optimization/references/virtualization.md` | | State management strategies, context splitting | `skills/react-performance-optimization/references/state-management.md` | | useTransition, useDeferredValue (React 18+) | `skills/react-performance-optimization/references/concurrent-features.md` | | React DevTools Profiler, performance monitoring | `skills/react-performance-optimization/references/profiling-debugging.md` | | Common pitfalls and anti-patterns | `skills/react-performance-optimization/references/common-pitfalls.md` | ## Optimization Workflow ### 1. Identify Bottlenecks ```bash # Open React DevTools Profiler # Record interaction → Analyze flame graph → Find slow components ``` **Look for:** - Components with yellow/red bars (slow renders) - Unnecessary renders (same props/state) - Expensive computations on every render ### 2. Apply Targeted Optimizations **For unnecessary re-renders:** - Wrap component with `React.memo` - Use `useCallback` for stable function references - Check for inline objects/arrays in props **For expensive computations:** - Use `useMemo` to cache results - Move calculations outside render when possible **For large lists:** - Implement virtualization with react-window - Ensure proper unique keys (not index) **For slow initial load:** - Add code splitting with `React.lazy` - Analyze bundle size with webpack-bundle-analyzer - Use dynamic imports for heavy dependencies ### 3. Verify Improvements ```bash # Record new Profiler session # Compare before/after metrics # Ensure optimization actually helped ``` ## Common Patterns ### Memoize Expensive Components ```jsx import { memo } from 'react'; const ExpensiveList = memo(({ items, onItemClick }) => { return items.map(item => ( )); }); ``` ### Cache Computed Values ```jsx import { useMemo } from 'react'; function DataTable({ items, filters }) { const filteredItems = useMemo(() => { return items.filter(item => filters.includes(item.category)); }, [items, filters]); return ; } ``` ### Stable Function References ```jsx import { useCallback } from 'react'; function Parent() { const handleClick = useCallback((id) => { console.log('Clicked:', id); }, []); return ; } ``` ### Code Split Routes ```jsx import { lazy, Suspense } from 'react'; const Dashboard = lazy(() => import('./Dashboard')); const Reports = lazy(() => import('./Reports')); function App() { return ( }> } /> } /> ); } ``` ### Virtualize Large Lists ```jsx import { FixedSizeList } from 'react-window'; function VirtualList({ items }) { return ( {({ index, style }) => (
{items[index].name}
)} ); } ``` ## Common Mistakes 1. **Over-memoization**: Don't memoize simple, fast components (adds overhead) 2. **Inline objects/arrays**: New references break memoization (`config={{ theme: 'dark' }}`) 3. **Missing dependencies**: Stale closures in useCallback/useMemo 4. **Index as key**: Breaks reconciliation when list order changes 5. **Single large context**: Causes widespread re-renders on any update 6. **No profiling**: Optimizing without measuring wastes time ## Performance Checklist Before optimizing: - [ ] Profile with React DevTools to identify bottlenecks - [ ] Measure baseline performance metrics Optimization targets: - [ ] Memoize expensive components with stable props - [ ] Cache computed values with useMemo (if actually expensive) - [ ] Use useCallback for functions passed to memoized children - [ ] Implement code splitting for routes and heavy components - [ ] Virtualize lists with >100 items - [ ] Provide stable keys for list items (unique IDs, not index) - [ ] Split state by update frequency - [ ] Use concurrent features (useTransition, useDeferredValue) for responsiveness After optimizing: - [ ] Profile again to verify improvements - [ ] Check bundle size reduction (if applicable) - [ ] Ensure no regressions in functionality ## Resources - **React Docs - Performance**: https://react.dev/learn/render-and-commit - **React DevTools**: Browser extension for profiling - **react-window**: https://github.com/bvaughn/react-window - **Bundle analyzers**: webpack-bundle-analyzer, rollup-plugin-visualizer - **Lighthouse**: Chrome DevTools performance audit

Related skills

Data & Analysis

Marketing Skills

TL;DR: 23 marketing playbooks (CRO, SEO, copy, analytics, experiments, pricing, launches, ads, social). Use to get checklists + copy/paste d…

Data & Analysis

Crypto & Stock Market Data (Node.js)

No API KEY needed for free tier. Professional-grade cryptocurrency and stock market data integration for real-time prices, company profiles,…

Data & Analysis

Azure Storage

Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake. Answers questions about storage acc…

Data & Analysis

Azure Kusto

Query and analyze data in Azure Data Explorer (Kusto/ADX) using KQL for log analytics, telemetry, and time series analysis. WHEN: KQL querie…