Support Immutable.js out of the box?
msakrejda opened this issue · comments
Hello,
I'm playing around with seedux on our react project and it seems very cool! One of the ugly parts right now is that we rely heavily on Immutable.js
, and seedux doesn't understand it and treats it as raw objects, making the store very hard to navigate:
Any chance you'll natively support Immutable.js?
We'll definitely look into it! We're fans of Immutable.js as well.
Excellent. I tried to see if I could contribute this (theoretically it's just calling toJs
in the right place, no?) but ran into issues in #80.
This is a great idea, Maciek. I postulate that in order to support Immutable.js, the deep-diff algorithm needs to be modified to check the object's constructor and then filter out extraneous properties (are these additional Immutable.js properties non-enumerable?). In terms of code clarity, I think there could be an additional challenge due to how the immutable data structures are implemented (e.g. ImmutableList seems array-like on the surface, but in reality is a BST under the hood).