Well, we've just about got every last individual piece of our redox application put together, the
last thing we really have to do is start to wire all this stuff together and create an actual reduc
store.
I'm going to first begin by going into my reducers directory inside.
I'm going to make a new file called Index Dots inside of here.
I'm going to import all of my different reducers.
Right now, there's only one.
And we're going to use that combined reducers function that we get from Rydex to combine everything
together.
So at the very top, I will import combine reducers from Redux, I'll then import my reducer, which
we had called.
I think we just explored it as default, that's totally fine.
So I'm going to import repositories reducer.
From the repositories reducer file.
I'll then create a new variable called Reducers, and that's going to be the result of calling combined
reducers.
I'm going to say that we want to have a reducers piece of me, not reducers, but repositories.
There we go, piece of states and the value for this piece of state is going to come from the repositories
reducer.
And then finally, I will export default reducers to nothing very crazy inside of Europe.
This looks like what we would normally write out inside of a JavaScript Redux project.
All right, well, that's the last kind of little part we have to put together, so now we can combine
all these different parts into our actual redux story.
I'm going to create our story inside of a new file.
I'm going to inside the state directory.
I'm going to call this new file, Staats.
Inside of here, we will import.
Create store.
Apply middleware, we're going to get both those from Redox.
I will get thunk from redox thunk.
And then finally, our reducers, so we just set up from the reducers directory.
Then finally, at the very bottom, I will export CONSED store and the result of that is going to come
from create store, pass in reducers, pass in an initial state argument of an empty object.
And I will apply middleware.
And I'm going to apply the redox thunk middleware, let me zoom out just for a moment so you can see
that entire line.
All right, let's just about it let's remember one thing we discussed just a little bit ago, we had
said that it's really nice if we do not try to take things one at a time out of our redox directory
whenever we're trying to wired up to the back side of our application.
Instead, if we have a central index file inside of our root redox folder, in our case, we called
it the state folder, we can then import everything from our action creators and middleware, all these
different locations into this index ortez file and then export them from there and just make sure that
we're not trying to import stuff from these individual files one at a time, which again, generally
ends up being just a little bit confusing.
So the last thing we have to do on the right side of our project inside of states, I'm going to make
an index dots file.
And then from here, like I said, we're going to export everything that we might need to get access
to from other parts of our project.
The first thing I'm going to export is star from our store file we just created, so that means now
that exported from this file is going to be a store variable.
I'm also going to export star.
As action creators.
From actions must mean action creators that saying, go into our action, Graeter's index dots file,
find all the named experts inside of here and just export Altham as something called action creators.
I think that's pretty much it for right now, there is going to eventually be one or two other experts
we add inside of here, but we're not going to add them in just yet because they're not going to quite
make sense right now.
So eventually, a little bit more is going to be added into this file.
All right, so it looks pretty good.
Well, we can take a pause right here.
Come back in the next video and we're going to start to wire up the right side of our application to
the backside.