Skip to content

Record #15

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

Closed
arieldf opened this issue Mar 25, 2017 · 5 comments
Closed

Record #15

arieldf opened this issue Mar 25, 2017 · 5 comments

Comments

@arieldf
Copy link

arieldf commented Mar 25, 2017

Using immutable records seems not to be supported, or am I wrong?

@pedroteixeira
Copy link
Contributor

It should work, but I haven't tested.

Just checked that there is currently a check isMap that uses Immutable.Iterable.isKeyed and Records should pass that:

var A = Immutable.Record({a:null})
Immutable.Iterable.isKeyed(new A({}))
> true

Please, feel free to improve this library submiting tests or patches!

@pedroteixeira
Copy link
Contributor

pedroteixeira commented Mar 31, 2017

Just checked, and it seems to work fine:

require('immutablediff')(new A({a:2}),  new A({a:3})).toJS()
[{"op":"replace","path":"/a","value":3}]

@arieldf
Copy link
Author

arieldf commented Apr 3, 2017

@pedroteixeira I am using Immutable 4.0.0rc2 and this is not working. I will investigate - basically it replaces the whole structure

@pedroteixeira
Copy link
Contributor

hmm. thanks, I was testing with 3.7.x - will try to have a look as well as soon as I can (prob. next week).
feel free to submit patches or suggestions!

@arieldf
Copy link
Author

arieldf commented Apr 6, 2017

I will @pedroteixeira. isKeyed is moved from Iterable to Collection in 4.0 and that is definitely a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants