dillon1000/react
Commit
Browse files 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.
Changed paths3 files
First-parent comparisonsrc/renderers/shared/fiber/ReactFiberCommitWork.js ModifiedM src/renderers/shared/fiber/ReactFiberScheduler.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…