Composite components versus layout primitives
WHAT IT TESTS: balancing consistency against flexibility in API design. OUTLINE: primitives give flexibility and composition, composites enforce consistency, choose by reuse and variation.
WHAT IT TESTS: whether you can reason about the consistency-versus-flexibility spectrum. ANSWER OUTLINE: primitives like Stack and Grid maximize flexibility and composition but push design decisions onto consumers; composites like UserProfileCard guarantee consistency and speed for repeated patterns but are rigid and proliferate. Choose composites for high-frequency, stable patterns and primitives for varied, evolving layouts; most mature systems offer both layers.
Read the original → interview
- #component-architecture
- #composition
- #primitives
- #api-design
- #consistency
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.