Perfect.
And once we're done with our products now, let's deal with the car and we're going to start in the
car context because again, all our functionality eventually is going to be here anyway.
So we might as well do the dirty work first where I would want to start by going to the car context
and in here jump to initial state and then let's just for values.
First one is going to be the car, which at the moment is going to be empty array, but we'll flip it
to the local storage interiors.
Then I would want to go with total and underscore items.
So that is just going to showcase how many items we have in a car total.
So not how many products we might have three products, for example.
But then if the amount for them is going to be different, then of course we're counting the total items.
And again, we'll start with the zero over here.
Then also we have total amount.
So that is going to be the total dollar amount and just chokers that.
For example, if we go here that are single product and then if I had to check it out, so now of course
these are my products and I have four of them.
And then since the amount for this one is five times five and the other two is one, that's why in the
actual icon, I can see that I have a total of 12 items.
And then when I talk about total amount, of course this is going to be my total amount when there's
going to be some shipping fee and there's also going to be a or total.
So that's going to be my total amount in the cost plus of the shipping fee.
And that's why I'll set up my total on the underscore amount and by default it is going to be zero.
And then as far as the shipping fee, I'm just going to come up with some value.
So say a shipping fee and I'm going to go with five dollars and then thirty four cents.
So I'm just going to go five thirty four because I'm displaying everything in the sense than in the
card provider.
I would want to set up my producer.
And we're going to do that, of course, using user dicer, so say state and dispatch over here.
So that's our function and that is equal to use producer.
And then, of course, we pass in the car producer.
So that is coming from the car producer.
Again, same setup, which is don't have any functionality order.
And then the second thing is my initial state.
So where I have the value, of course, right now, I would want to pass in my state.
So I'm going to go back to the JavaScript.
No Curley's and then I'm passing in the state line.
I also would want to set up my index because remember, just because we're setting up the context doesn't
mean anything unless we wrap our application.
And then, of course, we can access those values anywhere in our app.
So open up the sidebar.
We're navigating to index Ajaz.
We already have card provider and then of course we have product provider, filter provider.
And then inside of the filter provider we go with card.
Card provider, and then we just wrapped the application thrown out anywhere in our app, we should
have access to the card provider.