
React Patterns
A comprehensive reference for modern React that covers the full stack: hooks discipline, the server/client component split in App Router, Suspense boundaries, form actions with useActionState, and a clear decision tree for when to reach for context versus external stores. Leans heavily on composition patterns (children, render props, compound components) and includes practical guidance on when not to optimize. The accessibility section appears cut off, but the data fetching matrix and RSC boundary rules are especially useful if you're working in Next.js 13+. Opinionated in the right ways: derives state during render instead of syncing it in useEffect, defaults to unoptimized code until profiling proves otherwise.
- skills.sh installs
- 893
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill react-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
React Patterns
Idiomatic React 18/19 patterns for building robust, accessible, performant component trees.
When to Activate
- Writing or modifying React function components, custom hooks, or component trees
- Reviewing JSX/TSX files
- Designing state shape or component composition
- Migrating class components or older
forwardRef/useEffect-heavy code - Choosing between local state, lifted state, context, and external stores
- Working with Server Components / Client Components (Next.js App Router, RSC)
- Implementing forms with React 19 actions or controlled inputs
- Wiring data fetching with TanStack Query / SWR / RSC
Core Principles
1. Render is a Pure Function of Props and State
// Good: derive during render
function Cart({ items }: { items: CartItem[] }) {
const total = items.reduce((sum, i) => sum + i.price * i.qty, 0);
return <span>{formatMoney(total)}</span>;
}
// Bad: derived state stored separately
function Cart({ items }: { items: CartItem[] }) {
const [total, setTotal] = useState(0);
useEffect(() => {
setTotal(items.reduce((sum, i) => sum + i.price * i.qty, 0));
}, [items]);
return <span>{formatMoney(total)}</span>;
}
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Category
- Frontend Development
- First seen
- Jul 14, 2026
More from affaan-m/everything-claude-code
All 256- Frontend A11y870
- Marketing Campaign827
- Benchmark Optimization Loop826
- Latency Critical Systems818
- Parallel Execution Optimizer813
- Social Publisher806
- Data Throughput Accelerator805
- Prediction Market Risk Review801
- Recursive Decision Ledger801
- Prediction Market Oracle Research796
- Ito Basket Compare794
- Ito Data Atlas Agent794
- Ito Market Intelligence794
- Ito Trade Planner791
- Team Agent Orchestration539
- Dynamic Workflow Mode536
- Security Review11.5K
- Golang Patterns9.9K
- Backend Patterns8.7K
- Coding Standards8.7K
- Frontend Patterns8.6K
- Golang Testing8.4K
- Springboot Patterns7.7K
- Continuous Learning V27.5K