React Best Practices

SkillCloud & infra

React best practices from react.dev and Vercel. Use when: (1) Reviewing React code, (2) Debugging performance issues, (3) Optimizing bundle size, (4) Writing effects or state logic. Triggers on: React performance, re-render, bundle size, waterfalls, code splitting, memo, useCallback, useMemo, useEffect, SSR flicker, initial load slow, React Compiler, state structure, immutable update, setState array object.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the React Best Practices skill

What this skill tells your AI

The instructions your AI receives, as published by ahonn/dotfiles in .claude/skills/react-best-practices/SKILL.md and read by ahel’s review.

Performance patterns and guidelines from react.dev and Vercel Engineering.

Quick Reference (Priority Order)

CRITICAL - Must Follow

RuleImpactReference
Avoid unnecessary effectsRender cycles, bugseffect-pitfalls.md
Eliminate waterfallsFirst paint, TTIasync-waterfall-elimination.md
Parallel data fetchingLoad timeasync-parallel-requests.md
Avoid barrel importsBundle sizebundle-barrel-imports.md

HIGH - Strongly Recommended

RuleImpactReference
React Compiler (19+)Auto memoizationreact-compiler.md
Dynamic importsCode splittingbundle-dynamic-import.md
Preload on user intentPerceived latencybundle-preload.md
Strategic memo()Render perfrerender-memo-strategy.md
Server cachingServer responseserver-cache-patterns.md

MEDIUM - Recommended

RuleImpactReference
State structureMaintainabilitystate-structure.md
Immutable updatesAvoid mutation bugsimmutable-updates.md
Context splittingAvoid rerendersrerender-context-splitting.md
startTransitionUI responsivenessrerender-transitions.md
Set/Map lookupsO(1) vs O(n)js-set-map-lookups.md
Key patternsList renderingrendering-key-patterns.md

LOW - Nice to Have

RuleImpactReference
content-visibilityLong list renderrendering-content-visibility.md
Hydration flickerSSR stabilityrendering-hydration-flicker.md
Hoist static JSXAvoid re-creationrendering-hoist-static-jsx.md

Quick Decision Tree

React Issue?
├── Writing useEffect?
│   └── Check if needed → effect-pitfalls.md (CRITICAL)
├── Designing state?
│   └── Follow 5 principles → state-structure.md
├── Updating state?
│   └── Use immutable patterns → immutable-updates.md
├── Using React 19+?
│   └── Enable React Compiler → react-compiler.md
├── Slow initial load?
│   ├── Check for waterfalls → async-waterfall-elimination.md
│   ├── Check bundle size → bundle-barrel-imports.md
│   └── Preload on intent → bundle-preload.md
├── Slow interactions?
│   ├── Check re-renders → rerender-memo-strategy.md
│   ├── Check Context usage → rerender-context-splitting.md
│   └── Use transitions → rerender-transitions.md
├── Long list jank?
│   └── Use content-visibility → rendering-content-visibility.md
├── SSR flicker?
│   └── Inline script pattern → rendering-hydration-flicker.md
└── Slow server?
    └── Check caching → server-cache-patterns.md

Reference Files

FileContent
hooks-guide.mdHook patterns, decision guides, pitfalls
effect-pitfalls.mdWhen NOT to use useEffect
react-compiler.mdReact 19+ auto memoization
state-structure.md5 principles for state design
immutable-updates.mdArray/object update patterns
references/All reference files (19 total)

Search rules: grep -l "keyword" references/

Signals

GitHub stars
62
Forks
2
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
react-best-practices-ahonn
Source
github.com/ahonn/dotfiles