-
Notifications
You must be signed in to change notification settings - Fork 862
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
redux-presist not working with android #1430
Comments
We've run into the same problem with Android. Has anyone had any luck addressing it? Zero-ing to null-ing the timeout value hasn't worked. |
@mdescalzo I did not find any solutions, I am just storing it some data in my local storage now. I wanted to use redux to store and retrieve my user-token. At the moment I am retrieving it with AsyncStorage, it's a bit uglier in my opinion, but it does the job. Please let me know if you find a working solution! |
We're using it to persist user settings. It was working smoothly for months, but stopped recently. We haven't yet sorted a solution. We may have to more directly implement AsyncStorage, but that will get ugly. We may consider something like redux-localstorage-simple. |
@Moemen02 I just figured out how to get it working on our project. We were running into storage limit issues. I removed our largest reducer from the whitelist and it started working again. Are you storing your entire state redux state object? Trying using the whitelist to persist only the userToken. |
Yes. I also needed AsyncStorage_db_size_in_MB=500 in my gradle.properties |
I have run into the same problem with Android, and I solve it by increasing the storage size of asyncStorage import android.database.CursorWindow; |
Give a try to my library https://github.com/Redux-Utils/react-native-redux-persist/ I made it especially for react-native and expo. So far you can use AsyncStorage and Expo Secure Store |
@Moemen02 Thank you so much, that was what's happening in our project too!! |
@nguyentrancong Thank you, it worked for me |
So I have just started an expo project, and I am using redux-presist. My problem is that the state is loading fine on ios. But it's not working on android. When I save my code with live reload it is working fine. But when I restart the app it is not getting the storage data. It is only getting it when I save a change in the code (so when it live reloads). There are no problems on IOS.
this is my store.js:
And this is my app.js
The text was updated successfully, but these errors were encountered: