From the course: React: Software Architecture

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Using Redux with components

Using Redux with components

- [Instructor] So at this point, we have our actions, we have our reducers and we have our selectors, so the next thing we're going to do is create our redux store. So here's what that's going to look like. We're going to create a new file here called store.js. And we're going to import a few things up here at the top. The first thing we're going to do is import something called createStore from redux. And we're also going to import something called combineReducers. All right. Next up, we're going to import our reducers by saying import all as reducers from our reducers file. So this imports all of the exports from that file as an object. And next up, we're going to create what's called a rootReducer. This is basically where we define how each of our individual reducers fits into the over state of our application. So here's what it's going to good like in our case. We're going to say const rootReducer equals…

Contents