Skip to content
React·Intermediate·Conceptual·1 min read

What's a downside of the compound-component pattern compared to a single component with props?

Short interview answer

It requires the caller to compose several related pieces correctly, coupling them implicitly through shared context rather than an explicit prop contract — a piece used outside its parent's provider will fail silently or need an explicit guard.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Component composition patterns

Related questions