O'Reilly logo

JavaScript by Example by Dani Akash S

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Persisting Redux store

Our blog is fast to load since we have integrated Redux into it, however, our users still have to wait three seconds for the initial load. What if we could persist the Redux store offline and show it to users while the new data is loading?

Sounds good, and it's very simple too! I have already added two libraries to the dependencies list for this purpose:

redux-persist provides a simple way to persist your Redux store and rehydrate it whenever needed. This makes your store available offline when your users visit your page for the second time. 

localForage is a simple storage library that lets you use indexDB ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required