dillon1000/react

Commit

Fetch node to unmount separately from unmounting

My last strategy of getting each node recursively while unmounting was a pain to make work properly with ReactMount's confusing cache. Now, we get the node before unmounting anything in the subtree (and we don't try to find the nodes of descendants).

This is a temporary solution and can go away when we get rid of the giant ReactMount node hash map.

Fixes #5151.
Browse files
Changed paths8 files
First-parent comparison
M src/renderers/dom/client/__tests__/ReactMount-test.js ModifiedM src/renderers/dom/shared/ReactDOMComponent.js ModifiedM src/renderers/dom/shared/ReactDOMTextComponent.js ModifiedM src/renderers/shared/reconciler/ReactCompositeComponent.js ModifiedM src/renderers/shared/reconciler/ReactEmptyComponent.js ModifiedM src/renderers/shared/reconciler/ReactReconciler.js ModifiedM src/renderers/shared/reconciler/instantiateReactComponent.js ModifiedM src/test/ReactTestUtils.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…