Reputation: 1
Why react redux store state lost when page reload or refresh?
Please explain in detail is it obvious or should it persistent across the global applications
Upvotes: 0
Views: 39
Reputation: 67459
That's normal JavaScript behavior. A Redux store is just a normal JS variable, and all JS values are thrown away when a page is refreshed.
You can manually persist data from the Redux store using something like localStorage
, but you have to specifically choose to do so.
Upvotes: 1