Context API basics, Provider/Consumer, useContext, and Context vs prop drilling
Context lets a value be shared through a subtree without manually threading props through every intermediate component.
- Provider supplies the value
- Consumers or useContext read it
- Context is useful for truly shared cross-cutting values
Context API basics, Provider/Consumer, useContext, and Context vs prop drilling