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-code

Installs 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
1affaan-m avatarfrontend-a11yaffaan-m/everything-claude-codefrontend a11y870skills.sh installs
2manutej avatarui-design-patternsmanutej/luxor-claude-marketplaceCommon interface patterns, navigation patterns, form patterns, data display patterns, feedback patterns, and accessibility considerations854skills.sh installs
3wot-ui avatarwot-ui-cliwot-ui/open-wot使用、调试或维护 @wot-ui/cli 与 open-wot 仓库。适用于 wot CLI 命令、Agent/MCP 接入、doctor/usage/lint、组件知识查询、客户端 adapter、离线数据提取、构建测试、发布包检查和仓库开发;如果任务是直接编写 wd-* 组件页面或解释组件 API,应改用 wot-852skills.sh installs
4molefrog avatarreact-pdfmolefrog/skillsGenerate PDF documents using React-PDF library (@react-pdf/renderer). Use when creating PDFs, generating documents, reports, invoices, forms, or when user menti761skills.sh installs
5sickn33 avatarstitch-ui-designsickn33/antigravity-awesome-skillsstitch ui design737skills.sh installs
6vercel-labs avatarreact-best-practicesvercel-labs/vercel-pluginreact best practices721skills.sh installs