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

[react-core] Do not null fiber.sibling in detachFiber #16820

Merged
merged 1 commit into from Sep 18, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Sep 18, 2019

We encountered an issue internally when using findDOMNode and the changes introduced in #16807. Specifically, setting the fiber sibling field to null is problematic in that it runs into this invariant:

https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberTreeReflection.js#L213-L214

We traverse through the children of the fiber by going from fiber to fiber using sibling. Doing this, we encounter a child fiber that has been detatched earlier and thus has no sibling anymore, but the code for findCurrentFiberUsingSlowPath expects it should.

We need to revisit this, but for now, let's revert this specific change. I'll also try and make a repro when I get a chance and put in a follow up.

@sizebot
Copy link

sizebot commented Sep 18, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS against d637963

@trueadm trueadm merged commit 18cb590 into facebook:master Sep 18, 2019
@trueadm trueadm deleted the fiber-sibling branch September 18, 2019 12:19
gaearon pushed a commit to gaearon/react that referenced this pull request Sep 18, 2019
@trueadm trueadm mentioned this pull request Apr 21, 2020
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.

None yet

4 participants