react-performance-optimization

Optimize React rendering with memoization, code splitting, and virtualization.

29|15|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/NickCrew/claude-cortex --skill react-performance-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-performance-optimization
Source: https://github.com/NickCrew/claude-cortex/tree/main/skills/react-performance-optimization
Command: npx skills add https://github.com/NickCrew/claude-cortex --skill react-performance-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides proven patterns for optimizing React apps—memoization, code splitting, virtualization, and rendering efficiency.

Core Features & Use Cases

  • Memoization: Prevent unnecessary re-renders with React.memo and useMemo.
  • Code Splitting: Reduce initial load with dynamic imports and lazy loading.
  • ** virtualization**: Efficiently render large lists to improve performance.

Quick Start

Wrap a slow list component with React.memo and implement a lazy-loaded detail panel.

Frequently Asked Questions about react-performance-optimization

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

FAQPage Schema
How do I fix slow rendering in my React application?

Slow rendering in React typically stems from unnecessary re-renders. Use React.memo to prevent child components from re-rendering when props haven't changed, useMemo to cache expensive computations, and useCallback to maintain stable function references across renders. These memoization techniques eliminate redundant renders and speed up component updates.

When should I use React.memo versus useMemo for performance?

React.memo wraps entire components to skip re-renders when props are shallow-equal, ideal for expensive child components. useMemo caches the result of expensive computations within a component, returning the same value until dependencies change. Use React.memo for component-level optimization and useMemo for computation-level caching within render functions.

How do I reduce React app bundle size and initial load time?

Code splitting with React.lazy and Suspense dynamically imports components only when needed, shrinking your initial bundle. Wrap lazy-loaded components in Suspense boundaries to display fallback UI while loading. This defers non-critical code, enabling faster first paint and improving Time to Interactive metrics.

What's the best approach to render large lists efficiently in React?

Virtualization renders only visible list items in the viewport, dramatically reducing DOM nodes for large datasets. Combined with memoization of list item components, this technique prevents lag when scrolling tables and lists with thousands of rows, maintaining 60 FPS performance even with heavy data.

Do I need memoization for every React component?

No. Memoization adds overhead and should target demonstrable bottlenecks. Profile first with React DevTools Profiler to identify slow renders. Prioritize memoization for expensive child components with frequent parent updates, pure components handling large datasets, or list items in virtualized containers.

Can I combine code splitting and memoization for optimal React performance?

Yes. These techniques complement each other: code splitting reduces initial bundle and defer load, while memoization prevents unnecessary re-renders of loaded components. Together they address both startup latency and runtime smoothness, creating faster initial experiences and responsive interactions.