Introduction to Context API
The Context API exists to make it easy to share data considered “global” within a component tree.
Let’s have a look at an illustrated example before we delve into writing any code.
John has begun working with the Context API and has been impressed with it so far. Today, he has a new project to work on, and he intends to use the context API.
Let’s see what this new project is about.