react-performance-guidelines

Review and write React code using render boundaries, state ownership, and justified memoization.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/GregM1991/skills --skill react-performance-guidelines-gregm1991
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-performance-guidelines
Source: https://github.com/GregM1991/skills/tree/main/skills/react-performance-guidelines
Command: npx skills add https://github.com/GregM1991/skills --skill react-performance-guidelines-gregm1991

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React performance work often devolves into scattering useMemo and useCallback everywhere without addressing why updates propagate through the component tree. This Skill gives you a structured lens for writing and reviewing React code so optimizations target actual render boundaries, state placement, and hot-path work instead of ritual memoization. ## Core Features & Use Cases - Render Boundary Analysis: Trace each interaction from update source through state ownership to the subtree that rerenders, and verify it is the minimum useful scope. - Writing Workflow: Map interactions, colocate state with its real owner, split components by update responsibility, narrow props and context, and move expensive work off hot paths. - PR Review Workflow: Flag boundary regressions, hot-path computation, and unjustified memoization, with ready-to-use comment templates that name the update source and suggest the smallest fix. - Use Case: When reviewing a PR where search input state was lifted into a dashboard page component, identify that every keystroke rerenders the whole page and recommend colocating the state in the search box with debounced publishing to the table. ## Quick Start Ask the AI to review your React component or PR for render boundaries, state ownership, and hot-path work before approving it.

Frequently Asked Questions about react-performance-guidelines

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

FAQPage Schema
How do I review a React PR for performance problems?▼

Read for update flow rather than changed lines: identify new state, context, derived values, and prop shapes, then trace which interaction triggers each update and how far it propagates. Flag state lifted too high, hot-path computation, and memoization that hides architectural issues.

When should I use useMemo and useCallback in React?▼

Use useMemo for expensive derived values or stable identities that materially affect renders and effects. Use useCallback when callback identity matters to memoized children, effects, or subscriptions. Avoid adding them ritually without an identifiable calculation, identity, or child-render reason.

Why does my React page rerender on every keystroke?▼

This usually happens when input state is owned by a broad page or layout component, so every keystroke updates the entire subtree. Colocate the state in the input component and publish only debounced or submitted changes to heavier siblings like tables.

Should I split React context for performance?▼

Yes, when a provider mixes hot-changing UI state with stable services or config, every value change invalidates all consumers. Split providers by update frequency and consumer group, and memoize provider values only when consumer identity stability matters.

When is React memoization the wrong fix?▼

Memoization is wrong when it only masks state placed too high or props that are too broad. If a small interaction still propagates through a large subtree, fix ownership, component boundaries, or context fanout first instead of wrapping everything in memo.