Once we understand the basics of Redhawks and have separated reducer and actions into separate files,
I guess it's an awesome time to connect our app to a Redbox store.
However, this time we'll take a more serious approach and use React Relix Library for that sense.
Passing and get state function as a prop was killed while we were getting our feet wet with redux,
which is not a particularly serious approach in the long run.
And when we work with React Readers Library, we're looking for two things.
We're looking for a provider that will wrap our whole application and then essentially we are going
to use the Cannock function in each of the components that we want to access that info.
Now, the info that I'm talking about is the store.
So, for example, in our case that is called total demand and also, of course, our dispatch method.
And then we can pass in whatever actions we would want.
And as a side note, if you have worked with context, API setup is very, very similar.
So I'm going to start by importing the provider import.
It is a named export.
So we go with provider from REACT Redux.
So once we have our provider, then I would want to wrap my application.
And of course I have multiple choices so I could even technically go to ingest and wrap my AMP component
as well.
But since I'm already an app, it is a root component, I might as well just pass it to provider and
then each and every component will have access to my whole redox store.
Again, if you have worked with Context API, normally, probably you would use it next year.
You just wrap your app component.
But then since all the components are currently rendered in the objets anyway, might as well do it
right here.
So instead of Main, I'm going to delete this moment and I'm going to go with my provider component.
Once I save it, there will be a big factor.
The reason for this error is that the provider component is looking for the problem and the problem
is store.
And you can probably already guess what kind of value we need to pass in the store.
And if you're guessing store, you are exactly correct.
So store is equal to our store.
So if you call these Bugs Bunny just passing the Bugs Bunny, I once I said there's no error, everything
works well.
And now each and every component that is wrapped in the provider can access my store, can access the
dispatch method and set up the actions or essentially dispatch the actions to every store once we set
everything up using the correct function.