3 ms·
> So let's first back up and recognize that this earlier statement was flat out wrong. React does provide a systematic answer for this. Context was never a sys
by hbrn 4y ago
> So let's first back up and recognize that this earlier statement was flat out wrong. React does provide a systematic answer for this.
Context was never a systematic answer. Even today the docs say:
Apply it sparingly because it makes component reuse more difficult.
If you only want to avoid passing some props through many levels, component composition is often a simpler solution than context.
https://reactjs.org/docs/context.html#before-you-use-context https://reactjs.org/docs/context.html#before-you-use-context
And IIRC older docs would be even more harsh at recommending not to use context.