Skip to content

Immutable.fromJS should be proxied as well #3

Description

@kirillrogovoy

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions