Home:ALL Converter>Why use redux-persist over manually persisting state to localStorage?

Why use redux-persist over manually persisting state to localStorage?

Ask Time:2018-03-12T00:40:07         Author:mezod

Json Formatter

Another way to ask would be, if you really only want to start your app up with the data saved in localStorage (rehydrate) and save every redux state change to localStorage (persist) is using redux-persist any better than using your own solution like Dan Abramov explains here?

I understand redux-persist comes with a lot of other features, and I myself started using it to be able to use redux-persist-crosstab (to be able to deal with changes between apps running in different tabs), but I wonder if it's overkill to use it for the most basic scenario. Especially since it's harder to understand and sometimes does funny stuff, like calling persist/REHYDRATE randomly.

Am I missing anything obvious here?

Author:mezod,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/49222396/why-use-redux-persist-over-manually-persisting-state-to-localstorage
yy