React
Installation
SKILL.md
When to Use
User needs React expertise — from component design to production patterns. Agent handles hooks, state management, rendering optimization, and data fetching.
Quick Reference
| Topic | File |
|---|---|
| Hooks patterns | hooks.md |
| State management | state.md |
| Performance optimization | performance.md |
| Component patterns | patterns.md |
Common Mistakes
{count && <Component />}renders "0" when count is 0 — always use{count > 0 && <Component />}for numeric conditions- Never mutate state directly (
array.push()thensetState(array)) — React won't detect the change. Always spread:setState([...array, item]) - Keys generated during render (
key={Math.random()}) destroy and recreate components every render — generate stable IDs when data is created - Uninitialized controlled inputs (
useState()without default) flip between controlled/uncontrolled — always initialize with empty string or appropriate default