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

Installs into .claude/skills of the current project.

Files

React Patterns

Principles for building production-ready React applications.


1. Component Design Principles

Component Types

TypeUseState
ServerData fetching, staticNone
ClientInteractivityuseState, effects
PresentationalUI displayProps only
ContainerLogic/stateHeavy 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

PatternExtract When
useLocalStorageSame storage logic needed
useDebounceMultiple debounced values
useFetchRepeated fetch patterns
useFormComplex 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

ComplexitySolution
SimpleuseState, useReducer
Shared localContext
Server stateReact Query, SWR
Complex globalZustand, 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
1davila7 avatarreact-devdavila7/claude-code-templatesThis skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components a498skills.sh installs
2manutej avatarnextjs-developmentmanutej/luxor-claude-marketplaceComprehensive Next.js development skill covering App Router, Server Components, data fetching, routing patterns, API routes, middleware, and full-stack Next.js 473skills.sh installs
3manutej avatarreact-developmentmanutej/luxor-claude-marketplaceComprehensive React development with hooks, components, state management, context, effects, and performance optimization based on official React documentation468skills.sh installs
4pproenca avatarzustandpproenca/dot-skillsZustand state management best practices for React applications. Use when writing, reviewing, or refactoring Zustand stores to ensure optimal performance and mai453skills.sh installs
5suryavirkapur avatarsolidjssuryavirkapur/skillsSolidJS framework development skill for building reactive web applications with fine-grained reactivity. Use when working with SolidJS projects including: (1) C452skills.sh installs
6davila7 avatarnextjs-supabase-authdavila7/claude-code-templatesExpert integration of Supabase Auth with Next.js App Router Use when: supabase auth next, authentication next.js, login supabase, auth middleware, protected rou410skills.sh installs