Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Jul 29, 2019

Previously, editing a class component would cause refs to it to get nulled after an edit.

This fixes the ref to be transferred on remount so it doesn't get lost. Added a (previously failing) regression test.

Thanks @TheSavior for the bug report.

@sizebot
Copy link

sizebot commented Jul 29, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

@bvaughn
Copy link
Contributor

bvaughn commented Jul 29, 2019

Nice!

@gaearon gaearon merged commit 9914a19 into facebook:master Jul 29, 2019
@gaearon gaearon deleted the fresh-remount-refs branch July 29, 2019 16:19
gaearon added a commit to gaearon/react that referenced this pull request Jul 29, 2019
* Add a failing test for refs and remounting

* Transfer ref when remounting
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.

6 participants