dillon1000/react

Commit

Resolve ref callbacks

During the deletion phase we call detachRefs on any deleted refs.

During the insertion/update phase we call attachRef on class
and host components.

Unfortunately, when a ref switches, we are supposed to call all
the unmounts before doing any mounts. This means that we have to
expact the deletion phase to also include updates in case they
need to detach their ref.
Browse files
Changed paths4 files
First-parent comparison
M src/renderers/shared/fiber/ReactChildFiber.js ModifiedM src/renderers/shared/fiber/ReactFiberCommitWork.js ModifiedM src/renderers/shared/fiber/ReactFiberCompleteWork.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…