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
From the course: React: Software Architecture
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
-
-
-
-
-
(Locked)
What is state management?3m 25s
-
(Locked)
Small state with the useState Hook5m 20s
-
(Locked)
Small state with context5m 48s
-
(Locked)
Accessing context inside components4m 53s
-
(Locked)
Medium state with Recoil6m 7s
-
(Locked)
Sharing Recoil state6m 49s
-
(Locked)
Using Recoil selectors5m 9s
-
(Locked)
Big state with Redux6m 29s
-
(Locked)
Using Redux with components8m 1s
-
(Locked)
Big state with MobX7m 48s
-
(Locked)
-
-
-
-