dillon1000/react

Commit

Include Ownership in the Ship of Theseus

When we determine whether a React component should be updated (as opposed to destroyed or replaced), we currently only look at whether they share the same constructor. This adds a check for whether they share the same owner component.

I've also consolidated this logic (I cannot believe this was not already done).
Browse files
Changed paths5 files
First-parent comparison
M src/core/ReactCompositeComponent.js ModifiedM src/core/ReactMount.js ModifiedM src/core/ReactMultiChild.js ModifiedM src/core/__tests__/ReactMultiChild-test.js ModifiedA src/core/shouldUpdateReactComponent.js Added
Patch

Files changed

Rendering syntax-highlighted changes…