In React, reusable UI usually follows two patterns: composition components and compound components. They are closely related, but they differ mainly in how state is handled and how the API is exposed. Composition Components (no Context) This is the most straightforward approach. You build UI by combining components and passing data through props. Everything is explicit: each component receives w
Composition vs Compound Components in React
Duffman·Dev.to··1 min read
D
Continue reading on Dev.to
This article was sourced from Dev.to's RSS feed. Visit the original for the complete story.