-
Notifications
You must be signed in to change notification settings - Fork 473
keys do not persist between app reloads #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I too am experiencing this issue the last few days - but only on iOS simulator (iOS 12.4). I only experience this intermittently when using "@react-native-community/async-storage": "^1.6.1" |
Hello, I also had this problem before finally realizing that I was still importing the package from react-native in some places. It turns out that this created conflicts between the different libraries on IOS. I hope this could help you in some way. |
@ElieMyIdea ☝️ Yes, this fixed my issue after changing all usage/imports to use this package only. Thanks for mentioning 👍 |
Thanks @ElieMyIdea That seems to be the case for me as well. @crobinson42 I am also finding that my dependencies using the old import may be causing some of the issues too. |
I'm using: |
Probably one of your dependency is still using Async Storage from the core - there's a condition race if that's the case. You can read more about it here |
@krizzu |
Current behavior
Async Storage does not persist between app reloads
Expected behavior
expect the storage to persist between app reloads
Repro steps
Theory: It may be due to my environment. I am on RN 0.60.3 but link async-storage manually instead of relying on the auto-linking mechanic. Could this cause an issue?
Steps to reproduce:
store items in storage
await AsyncStorage.setItem('someItem', JSON.stringify(someItem));
retrieve items to ensure they have been stored
Environment
do not use podfile, instead link react-native manually
"@react-native-community/async-storage": "^1.6.1"
"react-native": "0.60.3"
The text was updated successfully, but these errors were encountered: