Skip to content

Comment on State-based vs Signal-based renderingparent

Comments

ContextProvider is for when you have some data that any random component might need, and you don’t want to clutter up the system by passing it through every component (this is called “prop drilling”). Or maybe you can’t pass it through some container component that you don’t control.

That consideration is orthogonal to what the useful data is. It could be a signal, or not. In other words, signals are not an alternative to context.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.