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

When is a custom hook a better choice than a render-prop component?

Short interview answer

When there's stateful logic to share but no rendering structure that needs to wrap the consumer — a hook shares the exact same logic without adding an extra component layer or constraining how the consumer's markup is structured.

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