Feature Folders & UI vs Composite Components
Adopt feature folders and split components: tiny reusable UI primitives vs feature-specific composites that orchestrate state and data.
Why structure matters
Goal: Structure code that scales.
- Feature folders collect related code
- UI primitives are tiny visual building blocks
- Composite components wire them together
Feature-first folders
- features/checkout/ (routes, composites, hooks, tests)
- ui/ (primitives: Button, Input, Card)
- lib/ (helpers)
- assets/ (icons, styles)
All lessons in this course
- Feature Folders & UI vs Composite Components
- Hooks Folder Conventions & Test Co-location
- Refactoring Guidelines