dillon1000/react
Commit
Browse files findDOMNode when a component is not yet mounted or unmounted
First we need to check if a component subtree is mounted at all. If it is, we need to search down the fiber for the first host node. However, we might be searching the "work in progress" instead of current. One realization is that it doesn't matter if we search work in progress or current if they're the same. They will generally be the same unless there is an insertion pending or something in the alternate tree was already deleted. So if we find one of those cases, we switch to look in the alternate tree instead.
Changed paths3 files
First-parent comparisonsrc/renderers/noop/ReactNoop.js ModifiedM src/renderers/shared/fiber/ReactFiberTreeReflection.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalReflection-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…