
React Patterns
A reference guide that covers modern React development from hooks to TypeScript patterns. You get quick lookup tables for state management decisions (when to use Context vs Zustand), performance optimization triggers, and React 19's new hooks like useActionState and useOptimistic. The anti-patterns section alone is worth having around. It's laid out as scannable tables rather than prose, which makes it genuinely useful when you're mid-task trying to remember whether to extract that custom hook or deciding where state should live. Treats composition as the organizing principle throughout, which is the right lens for React work.
- skills.sh installs
- 503
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill react-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
React Patterns
Principles for building production-ready React applications.
1. Component Design Principles
Component Types
| Type | Use | State |
|---|---|---|
| Server | Data fetching, static | None |
| Client | Interactivity | useState, effects |
| Presentational | UI display | Props only |
| Container | Logic/state | Heavy state |
Design Rules
- One responsibility per component
- Props down, events up
- Composition over inheritance
- Prefer small, focused components
2. Hook Patterns
When to Extract Hooks
| Pattern | Extract When |
|---|---|
| useLocalStorage | Same storage logic needed |
| useDebounce | Multiple debounced values |
| useFetch | Repeated fetch patterns |
| useForm | Complex form state |
Hook Rules
- Hooks at top level only
- Same order every render
- Custom hooks start with "use"
- Clean up effects on unmount
3. State Management Selection
| Complexity | Solution |
|---|---|
| Simple | useState, useReducer |
| Shared local | Context |
| Server state | React Query, SWR |
| Complex global | Zustand, Redux Toolkit |
State Placement
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Frontend Development, Debugging
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Executing Marketing Campaigns498
- React Dev498
- Knowledge Distillation497
- Rag Implementation497
- Coding Standards494
- Api Documentation Generator493
- Autonomous Agents492
- Backend Dev Guidelines492
- Database Schema Designer489
- Typescript Expert489
- Api Patterns486
- Skill Creator484
- Supabase Postgres Best Practices481
- File Organizer480
- Research Engineer478
- Llama Cpp475
- App Builder474
- Security Review471
- Api Security Best Practices466
- Senior Secops466
- Long Context465
- Autogpt Agents464
- Parallel Agents463
- Serving Llms Vllm461