RSSAmplifier

nickb.dev · Jan 28, 2024

The composition king: compound components

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Repeatedly adding orthogonal properties to a React component causes unwieldy bloat. Transitioning to a compound component will invert control and allow clients the flexibility they need. It comes at a cost, though. What are these costs, can we mitigate them, and what are alternative solutions? 
 Let’s build a motivating example of a component’s growth. Say we’re building an…

Read on nickb.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.