DEV Community

Discussion on: Stop Building Your UI Components like this❌

Collapse
 
iainsimmons profile image
Iain Simmons

Nice! I read about a similar concept on Patterns.dev: patterns.dev/posts/compound-pattern/

They also use named exports for the child components so that you can import everything into a single variable. I don't know how much of a difference that makes with tree shaking, etc.