-
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
Handle errors #1
Comments
Added I am still trying to figure out a decent api for persisting state. One function with 4 (mostly optional) arguments is clumsy. Also having to add a rehydrate action handler per reducer can be tedious and error prone. |
Why not rehydrate by providing the initial state? For example that's how persistState works. |
@gaearon a few things:
I implemented pluggable storage last night in order to support react-native. New API: const config = {
blacklist: ['someReducer'],
actionCreator:rehydrate,
storage: AsyncStorage,
}
persistStore(store, config, () => {
console.log('restored')
}) |
Setup automatic asset building
@rt2zz how can I catch an error, i.e of no space in disk, while the persist action is happening in a react native app? |
Pause for flush, fixes race condition.
Be careful with
localStorage
! The data might get corrupted or something, sotry
/catch
is a good idea.Worse, iOS in private mode will throw on every
.setItem
or.getItem
call.The text was updated successfully, but these errors were encountered: