Context API is very handy to pass down data, but remember it causes all the children to rerender again.
This video explains how Context Works by debugging.
The implementation is not difficult, we need a stack to hold the possible multiple context provider, push when met, pop when completes.
Check out my blog for this episode https://jser.dev/react/2021/07/28/how...
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode & BFE.dev. If you are interested, maybe we can learn together.