Foundation
Before diving into recipes, here's everything you need to know about how this cookbook is structured and why it was built this way.
Why This Cookbook
Most resources teach React in isolation — isolated components, isolated hooks, isolated patterns. Real applications need structure, conventions, and a shared understanding of why things are built a certain way.
This cookbook connects three layers that usually live in separate places:
Abstract design philosophy. Guides how code should be shaped — single responsibility, open for extension, closed for modification.
Proven solutions to recurring problems. Concrete, reusable structures that apply SOLID principles in practice.
Actionable recipes that show patterns in real code. Step-by-step, framework-specific, immediately usable.
How Recipes Work
Every recipe follows the same five-step structure. Each step builds on the previous, taking you from concept to working code.
Folder Structure
referenceExamples in this cookbook use the structure below. It's not a mandate — adapt it to your team's conventions. The goal is to show one coherent way everything fits together.
src/
├── features/
│ └── [feature]/
│ ├── components/ — UI components for this feature
│ ├── hooks/ — Query & mutation hooks (co-located)
│ └── stores/ — Zustand stores (if needed)
├── shared/
│ ├── components/ — Cross-feature UI components
│ ├── hooks/ — Pure UI hooks (no API calls)
│ └── types/ — Shared TypeScript types
├── lib/ — API client, query keys, mock data
└── ui/ — Design system primitivesConventions
Code examples across all recipes follow these conventions consistently.
Ready to start?
Browse all recipes in the cookbook.