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.
Persisting the Redux store
From the course: Building Modern Projects with React
Persisting the Redux store
- [Instructor] We now have a functioning React application that uses Redux to keep track of its state. Even though our app so far is a pretty limited little todo application, this is a pretty big achievement still. One thing that we do need to address however, is that our application works quite well for adding and removing todos, but when we refresh the page as a user might sometimes do, our entire Redux state is lost and starts over from scratch. And this is definitely not ideal, but unfortunately there's a fairly straightforward way to do this, and in this video we'll see exactly how. So to ensure that the state of our application is kept through a browser refresh or some related event, we'll be using something called Redux Persist. The first thing we're going to do is install this package by running npm install redux-persist. And once we've done that we need to make a few changes to our store.js and index.js…
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
-
-
-
-
-
-