-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
initialState rootReducer, serialise/ desialise state maintaining types #34
Comments
This question has little to do with Regardless, it is an interesting issue, one that I did not even realise I have. : ) Quick Google search brought me to https://www.npmjs.com/package/transit-immutable-js And thats http://blog.cognitect.com/blog/2014/7/22/transit an intro to Transit data interchange format. This looks like a reasonable solution. |
@beckend I would appreciate if you'd share your findings with others. Can you raise a PR? |
Same issue when serializing a Ill try the provided packages |
@kandros I have suggested a fix. Is it still an issue? |
For the record, I have been using transit-immutable-js in production for a while now. There are no downsides to it, other than a relatively large bundle size addition. |
Let's say I have a reducer with initialState:
myReducer
Then time to save to local store:
Then to restore it:
Then the reducer has been restored, but as a
Immutable.List
because ofImmutable.fromJS
:Is there a good solution to retain the immutable types somehow?
The text was updated successfully, but these errors were encountered: