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

use Object.is for checking mutated children #7436

Closed
wants to merge 1 commit into from
Closed

use Object.is for checking mutated children #7436

wants to merge 1 commit into from

Conversation

just-boris
Copy link
Contributor

fixes #7424

@ghost
Copy link

ghost commented Aug 6, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@chicoxyzzy
Copy link
Contributor

If we're going to use object-is package we also should use it here IMO. cc @zpao

@ghost
Copy link

ghost commented Aug 6, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@just-boris
Copy link
Contributor Author

just-boris commented Aug 6, 2016

вы тут ночуете что ли?

Of course, I'd like to found all other usages and replace with this lib as well, like it happens with object-assign now.
But let's wait for feedback from team members first.

@caub
Copy link

caub commented Aug 8, 2016

except NaN, is there another case where it's useful?

@just-boris
Copy link
Contributor Author

This also doesn't differ +0 and -0, but I don't think that this can be useful for mutation check.

@zpao
Copy link
Member

zpao commented Aug 8, 2016

Using this external module is going to be more trouble than it's worth right now. We'd have to do something like #6376.

Could you instead inline a copy of the fn like we did in #6132. It's a couple extra bytes but not a huge deal.

@caub
Copy link

caub commented Aug 8, 2016

Can't this be a polyfill since Object.is is now in browsers/node.js?

@zpao
Copy link
Member

zpao commented Aug 8, 2016

We can discuss that separately. Right now we haven't required the polyfill exist in the other places it's used so we won't start now.

@just-boris
Copy link
Contributor Author

just-boris commented Aug 14, 2016

I think this is not actual, because #7455 removes this code at all.

Also, now Object.is is used only in ReactPropTypes.js module, so there is no need to create it as shared module.

@just-boris just-boris closed this Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False-positive mutation warning
5 participants