dillon1000/react

Commit

Fix findDOMNode and findAllInRenderedFiberTreeInternal

This strategy finds the current fiber. It traverses back up to the root if
the two trees are completely separate and determines which one is current.
If the two trees converge anywhere along the way, we assume that is the
current tree. We find the current child by searching the converged child
set.

This could fail if there's any way for both return pointers to point
backwards to the work in progress. I don't think there is but I could be
wrong.

This may also fail on coroutines where we have reparenting situations.
Browse files
Changed paths5 files
First-parent comparison
M scripts/fiber/tests-failing.txt ModifiedM scripts/fiber/tests-passing.txt ModifiedM src/renderers/shared/fiber/ReactFiberScheduler.js ModifiedM src/renderers/shared/fiber/ReactFiberTreeReflection.js ModifiedM src/test/ReactTestUtils.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…