Skip to content
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

Immutable.fromJS should be proxied as well #3

Open
kirillrogovoy opened this issue Sep 12, 2016 · 1 comment
Open

Immutable.fromJS should be proxied as well #3

kirillrogovoy opened this issue Sep 12, 2016 · 1 comment

Comments

@kirillrogovoy
Copy link

Hi!

The problem is that many people ofter convert values from vanilla data to Immutable objects using fromJS and you don't get the immutable-proxy features now when using that function which gives you a false feeling that everything will work right away with now additional code analysis. Actually, I've just spent more that 30 minutes to figure out what was wrong with my code.

My proposition is to "trap" the fromJS method as well.

Docs: https://facebook.github.io/immutable-js/docs/#/fromJS
Sources: https://github.com/facebook/immutable-js/blob/master/src/fromJS.js

It seems it'd be really trivial to trap it (with, perhaps, a bit of copy-paste).

What do you think?

Thank you!

P.S. I can implement it myself if the idea sounds good for you.

@zackify
Copy link
Member

zackify commented Sep 12, 2016

Go for it, I'll merge what you do.

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