Usage with seamless-immutable
See original GitHub issueHey, I’m trying to use this library with seamless-immutable. I created a transform like this:
let immutableTransform = createTransform(
(inboundState) => inboundState.asMutable? inboundState.asMutable({deep: true}) : inboundState,
(outboundState) => immutable(outboundState)
)
But the immutable wrapper around the data seems to get discarded at some point, meaning that my reducers break as they rely on the wrapper methods. Is there anything else I need to add?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
rtfeldman/seamless-immutable - GitHub
Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects. - GitHub - rtfeldman/seamless-immutable: ...
Read more >seamless-immutable - npm
Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.. Latest version: 7.1.4, ...
Read more >Why I like seamless-immutable with React and Redux - Medium
The case for seamless-immutable This simplifies React component development. Reading the properties of immutable state is no different than ...
Read more >seamless-immutable examples - CodeSandbox
Learn how to use seamless-immutable by viewing and forking example apps that make use of seamless-immutable on CodeSandbox. ; reactypePrototyping tool for React/ ......
Read more >React reducers & seamless-immutable - redux - Stack Overflow
{ ...state, loading: action.payload } and state.merge({ loading: action.payload }) is the same, but Immutable.merge ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I know this is closed but if you implement a transformer like this (view the attached code) it works really well.
For those of you using v5 and having trouble, I grabbed these transformers + whipped up a custom
stateReconcilerthat helps you useseamless-immutableand avoid the dreadedstate.merge is not a functionerror you get when processing actions after rehydration.Thanks to @josev55 and @robclouth for the original transforms, a variant of which is also included in this lib!
https://github.com/hilkeheremans/redux-persist-seamless-immutable