dillon1000/react

Commit

Invoke all null ref calls before any new ref calls

This reorganizes the two commit passes so that all host
environment mutations happens before any life-cycles. That means
that the tree is guaranteed to be in a consistent state at that
point so that you can read layout etc.

This also lets us to detach all refs in the same pass so that
when they get invoked with new instances, that happens after it
has been reset.
Browse files
Changed paths3 files
First-parent comparison
M src/renderers/shared/fiber/ReactFiberCommitWork.js ModifiedM src/renderers/shared/fiber/ReactFiberScheduler.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…