React Patterns
Modern React principles covering component design, hooks, state selection, composition, performance, and TypeScript typing.
- CCM score
- 56 of 100
- skills.sh installs
- 503
- GitHub stars
- 34.3K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers component types (server, client, presentational, container), hook extraction rules, and state management selection by complexity
- Includes React 19 guidance on
useActionState,useOptimistic, anduse, plus compound component and render prop composition patterns - Enforces a profile-first optimization order and lists anti-patterns such as prop drilling, index-as-key, and overusing
useEffect - Designed for React teams writing TypeScript who want consistent architectural decisions across components, state, and tests
Install
$ npx -y skills add davila7/claude-code-templates --skill react-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/davila7/claude-code-templates
- Category
- Frontend & UI Code
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 398- Rag Implementation500
- Executing Marketing Campaigns499
- Api Documentation Generator494
- Backend Dev Guidelines494
- Coding Standards494
- Autonomous Agents492
- Typescript Expert491
- Api Patterns486
- Supabase Postgres Best Practices482
- File Organizer481
- Research Engineer478
- App Builder476
- Api Security Best Practices471
- Parallel Agents469
- Manim466
- Senior Secops466
- Computer Use Agents457
- Git Commit Helper456
- Powershell Windows456
- Langgraph447
- Autonomous Agent Patterns446
- Prompt Caching441
- Accessibility Auditor438
- Code Review Checklist438
Similar to React Patterns
More Frontend & UI Codereact-best-practicesalleneubank/claude-code3.2K installsDecision-tree guide for React components that steers logic away from unnecessary Effects toward render, events, and refs.
react-19gentleman-programming/gentleman-skills278 installsReact 19 component patterns that rely on React Compiler instead of manual memoization.
react-composition-patternssecondsky/claude-skills505 installsReact composition patterns that scale for refactoring boolean-prop components and designing flexible, reusable APIs.
react-component-architectureaj-geddes/useful-ai-prompts688 installsReusable React component patterns covering functional components, custom hooks, composition, and typed props, with reference guides.
react-devsoftaworks/agent-toolkit4.2K installsType-safe React 18-19 patterns covering generic components, event typing, hooks, and router integration.
hooks-patternpatternsdev/skills1.3K installsReusable React Hooks guide for extracting shared stateful logic, forms, subscriptions, and side effects into custom hooks.