react-patternslisted
Install: claude install-skill ku5ic/dotfiles
# React patterns
Default assumption: React 19 with the modern (concurrent) renderer. Most rules apply unchanged to React 18; deltas (`use`, `useActionState`, `useFormStatus`, `useOptimistic`, Actions) are called out where they matter. Server Components are a feature of frameworks built on React; framework-specific patterns load when those framework signals are present in the project. Adapt advice to the version in the project's `package.json` or lockfile.
## Severity rubric
- `failure`: a concrete defect or violation that should not ship.
- `warning`: a smell or pattern that compounds with other findings.
- `info`: a hardening opportunity or note, not a defect.
## Reference files
| File | Covers |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [reference/correctness.md](reference/correctness.md) | Rules of Hooks, dependency arrays, key stability, effect cleanup, render pitfalls |
| [reference/performance.md](reference/performance.md) | Memoization costs, `React.memo`, virtualization, lazy init, context, React Compiler |
| [reference/structure.md](reference/structure.md) | Controlled vs uncontrolled, derived state, prop drilling, effects vs handlers |
| [reference/anti-patterns.md](reference/anti-patterns.md) | Seven revi