Reputation: 1865
Whenever there is a new update for the exisiting apk or ipa release , the redux persist data got cleared(for both android & ios). The user automatically logs out as the access-token which i stored using redux is no longer present. The following are the libraries and versions i used in my project for persistent storage.
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"redux-saga": "^0.16.2",
"reselect": "^4.0.0",
Is it because of any of the libraries i mentioned here? I can provide you the code for storing access token if required.
Upvotes: 2
Views: 1399
Reputation: 403
Well, this is expected as the app will cold-start after updates. No bug there.
Redux state is usually emptied upon when an app is exited (not minimised).
What you should to instead is to use AsyncStorage to persist your access token, and get them from same storage when the app starts. You can do this in a didMount
lifecycle, or any other means you may choose.
Upvotes: 0
Reputation: 5460
when you update the app, it might remove the stored keys. This might be the issue. If youre using persistent storage then it might remove the keys from the storage and might empty the storage after update
Upvotes: 1