-
Notifications
You must be signed in to change notification settings - Fork 42
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
Uncaught Error: Error serializing unrecognized object [object Object] #13
Comments
This project is just a wrapper around https://github.com/glenjamin/transit-immutable-js I would say if you need ArrayNodeMap support, it would be best to file an issue there. Also I think the situation will be improved this week when we release redux-persist-immutable with top level immutable support. |
Plug-an-Play support for |
I could figure out how the bug occurs. It happens here https://github.com/rt2zz/redux-persist/blob/master/src/createPersistor.js#L57: const enhancer = compose(
applyMiddleware(...middlewares),
autoRehydrate({
stateReconciler(state, inboundState, reducedState){
return state.merge(reducedState).merge(inboundState)
},
}),
]))
// ... other things ...
persistStore(store, {
storage: AsyncStorage,
transforms: [immutableTransform()],
_stateGetter: (state, key) => state.get ? state.get(key) : state[key],
_stateSetter: (state, key, value) => state.set ? state.set(key, value) : (state[key] = value, state),
_stateIterator: (state, callback) => state.keySeq().forEach(key => callback(state.get(key), key)),
}) Hope that it'll be useful for anyone else there facing the same issue! |
I'm running into this issue currently, but only seeing the error in safari. Any idea why? |
UPDATE:
react-boilerplate
immutable is usingArrayMapNode
which doesn't support
toMap
functionThat why it produce below error.
Do you think it is possible to make it compatible?
I used react-boilerplate as a starter kit.
It's using fromJS immutable as the store.
I then try to add this library to make it persistence.
However, it have this error on my
console.log
I'm not sure why does this happen, would you please advise?
The text was updated successfully, but these errors were encountered: