React Patterns
React 18/19 patterns that cover hooks discipline, RSC boundaries, Suspense, form actions, and state placement.
- CCM score
- 73 of 100
- skills.sh installs
- 8.5K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers render purity, side-effect placement, state location decisions, and data fetching choices for React components
- Includes server/client component boundary rules, Suspense and error boundary placement, and React 19
useActionStateform examples - Enforces derived values computed during render rather than stored in
useEffect, and memoization only when a profiler justifies it - Designed for developers writing or reviewing React components in Next.js App Router or similar component trees
Install
$ npx -y skills add affaan-m/ecc --skill react-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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>;
}
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Frontend & UI Code, Code Review & Quality
- First seen
- Jul 14, 2026
Questions
What does the react-patterns skill help with?
The react-patterns skill covers React 18 and 19 patterns, including hooks discipline, server and client component boundaries, Suspense and error boundaries, form actions, data fetching, and state management decisions. It is meant for writing or reviewing React components, with an accessibility-first approach to composition.
How do I install the react-patterns skill?
Run npx -y skills add affaan-m/ecc --skill react-patterns -y in your project to install it. Once installed, the agent can follow React 18 and 19 patterns when it writes or reviews React function components, custom hooks, and JSX or TSX files.
Does react-patterns cover Next.js App Router and React Server Components?
Yes, the skill covers working with Server Components and Client Components, including the App Router in Next.js. It explains where to place the use client boundary and how Server Actions connect to React 19 form actions.
When should an agent use react-patterns?
Use it when writing or modifying React function components, custom hooks, or component trees, or when reviewing JSX and TSX files. It also applies when choosing between local state, context, and external stores, or when migrating older forwardRef and useEffect-heavy code.
More from affaan-m/ecc
All 257- React Testing8.5K
- React Performance8.5K
- Frontend A11y8.4K
- Recsys Pipeline Architect8.2K
- Marketing Campaign8.1K
- Uncloud8.1K
- Benchmark Optimization Loop7.8K
- Social Publisher7.8K
- Latency Critical Systems7.8K
- Parallel Execution Optimizer7.7K
- Prediction Market Risk Review7.7K
- Data Throughput Accelerator7.7K
- Prediction Market Oracle Research7.7K
- Recursive Decision Ledger7.7K
- Team Agent Orchestration7.3K
- Dynamic Workflow Mode7.1K
- Kubernetes Patterns7K
- Intent Driven Development6.9K
- Inherit Legacy Style6.9K
- Codehealth Mcp6.9K
- Orch Build Mvp6.9K
- Orch Pipeline6.9K
- Orch Add Feature6.8K
- Orch Fix Defect6.8K
Similar to React Patterns
More Frontend & UI Codefrontend-patternsaffaan-m/ecc17.6K installsPatterns for React and Next.js covering components, custom hooks, state management, and render performance.
react-performanceaffaan-m/ecc8.5K installsPerformance patterns for React and Next.js, organized into eight priority categories with rules for reviews and refactors.
react-19gentleman-programming/gentleman-skills274 installsReact 19 component patterns that rely on React Compiler instead of manual memoization.
react-best-practicesalleneubank/claude-code3.2K installsDecision-tree guide for React components that steers logic away from unnecessary Effects toward render, events, and refs.
hooks-patternpatternsdev/skills1.2K installsReusable React Hooks guide for extracting shared stateful logic, forms, subscriptions, and side effects into custom hooks.
react-expertjeffallan/claude-skills6K installsSenior React skill for React 19 apps, covering Server Components, Suspense, and hooks-based architecture.