From the course: Building Modern Projects with React
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding Redux to a React app
From the course: Building Modern Projects with React
Adding Redux to a React app
- Now that we know what problems Redux is meant to solve and the basic concepts behind how it works, let's walk through the process of actually adding Redux to our project. As a matter of fact, adding Redux to our project is really a simple process with only a few steps. So the first thing we're going to do is actually install Redux into our project and to that, we just need to open up a terminal inside our directory and run npm install redux and react-redux and hit enter. And once we've done that, the next thing we're going to do is create a new file inside our source directory called Store JS. This is where we're going to put our logic for setting up our Redux store. So we'll say store.js and for now this file is going to be pretty simple. We'll add more stuff to it as we create our actual reducers and add new ecosystem tools to our project. First, we're going to import two things from Redux. We're going to say import…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Why do you need Redux?4m 11s
-
(Locked)
How does Redux work?4m 35s
-
(Locked)
Adding Redux to a React app3m 24s
-
(Locked)
Creating Redux actions4m 16s
-
(Locked)
Creating reducers6m 23s
-
(Locked)
Connecting components to the store7m 1s
-
(Locked)
Running a React-Redux application4m 32s
-
(Locked)
Persisting the Redux store6m 43s
-
(Locked)
Redux DevTools3m 34s
-
(Locked)
Redux best practices3m 53s
-
(Locked)
Challenge: Adding a Redux flow1m 56s
-
(Locked)
Solution: Adding a Redux flow4m 14s
-
-
-
-
-
-