react
Installation
SKILL.md
React
React is a JavaScript library for building user interfaces through composable components, with a declarative model for describing UI as a function of state.
Documentation
Key Capabilities
React has built-ins for things developers commonly reach for external packages to solve:
- Unique IDs for accessibility: use
useId()— notuuidorMath.random()for linking labels to inputs - Debounced/deferred UI updates: use
useDeferredValue()oruseTransition()— not lodash debounce for keeping UI responsive during expensive renders - Code splitting: use
React.lazy()+<Suspense>— no extra bundler plugins or dynamic import wrappers needed - Optimistic UI: use
useOptimistic()(React 19+) — not manual state juggling for instant feedback before server confirms - External store integration: use
useSyncExternalStore()— not custom subscription hooks that miss concurrent-mode edge cases - Form action state: use
useActionState()(React 19+) — not separate loading/error/data useState triplets for form submissions - Memoization: use React Compiler (babel-plugin-react-compiler) — not manual
useMemo/useCallbackeverywhere; the compiler handles it automatically