All right.
And once we're familiar why we're using years or so.
Now let's wire up that register.
At the moment, our producer is empty and essentially what I want to do is set up a function that's
looking for two things for the current state and the action that is dispatched.
And also in the app context.
We want to import the producer.
We're just sitting in the file right next door and then instead of you state the damage to the body,
we currently have micro, we're going to use the reducer.
And then the first thing that we present is this function, which again is going to access the state
and action and then also get the initial state and then we can start setting up our first actions.
So let's navigate to a reducer.
And we're going to go here with producer function.
It's going to be equal to a state and action and not inside of function body.
We'll just throw the error.
So this is going to run if we'll dispatch some kind of action that's not actually handled in our industry.
And this case is I want to access the action type.
I'm going to go with template strength and then like, just say no such action and colon and let's access
the action type.
So I'm going to go here for my intuition and let's just say action and then Typekit.
Now we're due on to as default, so export default and we're looking for the reducer.
And then back in the app context, let's scroll up and before or after the initial state, I mean,
I'm going to do it above it.
We're going to go with the import VAT reducer from, like I said, it's right next door.
So we'll look forward to sir and then we might as well remove the use state.
We're not going to use it and replace it with a huge reducer.
And that in here we're looking for two things we're looking for the reducer.
So that's going to be the function which will handle our dispatch.
And this is going to be our initial state online where we have state and such that since we're not using
usthat, we're actually using reducer.
Most are going to rename this as this patch.
So that way, we know for sure that we're using use reducer.
And with these changes in place, we can start setting up our first actions.