API Ergonomics with Composition
Design friendly APIs using composition: small parts, sensible defaults, and clear names that read like markup.
Ergonomics overview
Goal: Make usage readable and flexible.
- Small named parts
- Clear defaults
- Composition over giant prop bags
Principles of a friendly API
- Name parts for intent (Header, Body, Footer)
- Composition controls order/visibility
- Defaults keep the happy path short
All lessons in this course
- Parent–Child Coordination via Context
- API Ergonomics with Composition
- Slots Pattern with Clearly Named Children