dillon1000/react

Commit

Cache native node on native components, return it when unmounting

This is probably slightly slower for unmounts in the case that no updates were ever performed, but caching the node on the instance should make updates faster. In any case, the more important consequence of this change is that we can fix the current memory leak that happens when swapping composite types.
Browse files
Changed paths5 files
First-parent comparison
M 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 Modified
Patch

Files changed

Rendering syntax-highlighted changes…