News for hackers. Stuff that matters.
Re:How UI-driven state increases accidental complexity by bryanrasmussen on Wednesday March 25, 2020 @09:48AM (#22684465)
Since he's using the context api https://reactjs.org/docs/context.html not exactly.

Imagine you have a React tree with a 100 node depth. You would then need to walk all the way up those 100 nodes, but using the context api you can put in context consumer at the branches of your tree where it makes sense, so instead of walking up 100 nodes you walk up 3 nodes to input into the global context.

Hope that is a reasonable high level explanation of a thing that can be complicated without experience of it.

There are no comments on this comment yet.