-
Notifications
You must be signed in to change notification settings - Fork 19
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
Persist state #57
Labels
Comments
@GerardKetuma, remx doesn't provide any built-in tools for that. You can make some helper that serializes & saves your stores data and manually call it after setting new values. |
Just use reactn + reactn-persist ;) |
This feature is requested multiple times already. We can discuss API that would be suitable for data persistence. I can imagine something like: remx.persistState({
storage: AsyncStorage, // localStorage, sessionStorage or any instance with Storage API interface support.
debounceDelay: 1000, // Persist debounce delay. Default 1000ms.
key: '@my-store',
dehydrate: () => ({products: myStore.products, data: myStore.data}),
rehydrate: ({products, data}) => {myStore.products = products; myStore.data = data;},
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you persist state when using remx? Any pointers will be great. Thanks
The text was updated successfully, but these errors were encountered: