react-render-optimization

Diagnose and fix unnecessary React re-renders using memoization and state design patterns.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/TierOne-Studio/spa-velocity --skill react-render-optimization-tierone-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-render-optimization
Source: https://github.com/TierOne-Studio/spa-velocity/tree/main/.ruler/skills/react-render-optimization
Command: npx skills add https://github.com/TierOne-Studio/spa-velocity --skill react-render-optimization-tierone-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React applications often suffer from sluggish UIs caused by unnecessary re-renders, wasted computation, and layout thrashing. This Skill provides 25 ordered, impact-ranked patterns to eliminate wasted renders and keep interfaces responsive. ## Core Features & Use Cases - Re-render Elimination: Patterns for derived state, coarse-grained subscriptions, memoized subtrees, and stable references that stop wasted renders at the source. - Concurrency & Responsiveness: Guidance on useTransition, useDeferredValue, and startTransition to keep typing and navigation responsive during expensive updates. - Rendering & DOM Performance: Techniques including content-visibility for long lists, batched DOM reads/writes, SVG wrapper animation, and React 19 resource hints for Vite SPAs. - Use Case: When a dashboard feels laggy during typing, apply the patterns to move filtering into useMemo, defer list updates with useDeferredValue, and stabilize callback identities with functional setState. ## Quick Start Review my React component for unnecessary re-renders and suggest optimizations using the render optimization patterns.

Frequently Asked Questions about react-render-optimization

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

FAQPage Schema
How do I reduce unnecessary re-renders in React?

Start by computing derived values during render instead of storing them in state, subscribe to coarse-grained state like booleans rather than raw values, and extract expensive subtrees into memoized components. These high-impact patterns eliminate most wasted renders before micro-optimizations.

When should I use useMemo vs a plain const in React?

Use a plain const for cheap derivations like boolean flags, string formatting, and property access. Reserve useMemo for work that iterates or transforms data, such as filtering arrays, sorting, or JSON.parse, where recomputation cost is real.

What is the difference between useTransition and useDeferredValue?

useTransition wraps a state update you control, marking it as non-urgent so urgent updates stay responsive. useDeferredValue wraps a value coming from props or a parent you do not control, deferring re-renders of components that consume it.

Does React Compiler replace manual memoization?

React Compiler auto-memoizes expressions and components, making manual useMemo, useCallback, and memo calls largely unnecessary. However, patterns like extracting components for early returns and avoiding components defined inside components remain valuable.

Why does defining a component inside another component cause problems?

Defining a component inside another creates a new component type on every render, forcing React to unmount and remount the entire subtree. This loses all state and DOM nodes; always define components at module scope.

How do I speed up rendering long lists in React?

Apply CSS content-visibility: auto with contain-intrinsic-size to list items so the browser skips layout and paint for off-screen content, giving 5-10x faster initial render. Combine with virtualization libraries like react-window for very large lists.