Hey welcome back.
So we have a new section on a brand new topic the context API.
So before we go into what it actually is and how it works I want to talk about where we came from and
where we're going next.
Why are we learning this.
So we talked about reactor hooks and hooks are awesome.
We're not done with hooks.
We'll return to them in just a bit.
They allow you to write these really cool functional components that have all the functionality that
regular class based components have.
And they also happen to be a lot shorter and cleaner easier to understand there's a whole bunch of benefits.
So context is something that you can use without hooks but you can also use it with hooks.
There is a specific reactor hook that spelt in called use context.
So we're going to learn context on its own outside of the context of hooks.
We're gonna learn first how it works with class based components sort of the old way of context.
I don't want to say the old way though because context hasn't been around very long.
And class based components aren't going anywhere anytime soon but we're going to learn the class based
approach first.
Then we're going to take what we learn and apply it to hooks so we'll learn how to use context with
Hook based or functional components.
All right.
So that's where we're going at least for the next couple of sections.
Then after that we're going to take what we learned about context about hooks and we're going to talk
about reduced hours and state management.
So how do we combine things like the use reducer hook and the use context took to things we haven't
covered yet.
So that might make no sense to you but these two hooks we're going to learn we can combine them to help
manage the craziness that is react state.
You might be familiar with redux or maybe you've at least heard of it redux is a way of centralizing
your application state and and logic basically having this centralized store that all your components
work with and communicate with retrieve data from via props.
It's it's kind of a big complicated topic.
We're going to learn how to basically mimic redux without having to use a third party library how we
can use react hooks context producers to get similar functionality.
It's the I want to say the new way of doing it.
It's a new way.
We'll talk more about how it compares to redux and if it if it really is a redux killer which is what
you'll hear a lot about on blog posts.
But for now I just want to.
That's the lay of the land.
That's where we're going with all of this.
So we're talking about hooks we already did that.
We're talking about context on its own in a class based component then we're talking about hooks with
context then we're talking about hooks plus context plus reduces which is mimicking redux functionality
state management.
OK.
That's where we're going.
I'm going to stop this video here.
The next one is going to start diving into context.
I'll show you the app we're going to build.
Explain what context is.
So I'll see you then.