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

Persisting the Redux store

From the course: Building Modern Projects with React

Start my 1-month free trial

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…

Contents