Imported from khalidsaidi/skillrunner (registry/skills/react-patterns/SKILL.md). Install upstream with npx skills add khalidsaidi/skillrunner --skill react-patterns. Copyright stays with the author.
React Patterns
Composition: Prefer composition over prop drilling; use context sparingly
State: Lift state only as needed; use useReducer for complex state
Effects: Keep effects minimal; extract logic to custom hooks
Keys: Stable keys for lists; avoid index when order can change
Memoization: React.memo, useMemo, useCallback only when profiling shows benefit
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/khalidsaidi-skillrunner-react-patterns/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.