Reputation: 101
I want to save data in the store with Redux, like tokens and user-related data to be used across the whole application (I'm using React).
The problem is that Redux does not persist in the state when refreshing a page.
Maybe I'm missing some core Redux or React concept? It feels a bit crazy for me not to be able to find a go-to package (or any other method) just to save a piece of data and be able to access it across the whole application without resetting on refresh :/
Upvotes: 0
Views: 362
Reputation: 44186
Redux-persist doesn't need to be very active - it works for half a decade now and there is just no need for a lot of changes. It works.
It is the to-go-package for that purpose.
Upvotes: 1