-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Keep reference equality if possible in update() #6353
Conversation
For $set and $apply it is cheap and easy to check whether the new value will be identical (===) to the old value and create a new object only when this is not the case. This will reduce excessive renders when using the pureRenderMixin. The same should be possible for for merge, but is more complicated so is not attempted here.
@gaearon updated the pull request. |
Ultimately we made a decision to not ship any more changes to I’m closing this PR for that reason. If someone wants to fork Thank you for understanding! |
@gaearon updated the pull request. |
I merged #4968 locally and then made a few changes on top that I thought would be welcome:
I figured I’d run this by Travis as well so I’m submitting it as a PR.
Credits for making this change happen go to @davidmason, I’m just tweaking minor things.
I intend this to land in 15 RC3.