What problem does it solve?
This Skill helps reduce unnecessary React re-renders and expensive rendering work that can make UIs lag, stutter during interactions, or show wasted work in the React component tree.
Core Features & Use Cases
- Derived state discipline: Avoids storing values that can be computed from props/state by deriving them during render and using
useMemo only for genuinely expensive transformations.
- Correct subscription granularity: Encourages subscribing to coarse-grained values (e.g., booleans/IDs) instead of continuously changing raw values.
- Render and update strategy: Promotes best practices like extracting expensive subtrees, using lazy initialization, stabilizing callbacks, and choosing the right scheduling tools (
useTransition, useDeferredValue, content-visibility) to keep the UI responsive.
- Structural correctness for performance: Prevents common pitfalls such as defining components inside other components (which causes remounting and state loss).
Quick Start
Use the react-render-optimization skill to review a React component (especially one with performance issues) and identify which render optimizations to apply, including derived value handling, dependency narrowing, and transitions/deferred rendering choices.