dillon1000/react
Commit
Browse files Update callbacks
Callbacks are stored on the same queue as updates. They care called during the commit phase, after the updates have been flushed. Because the update queue is cleared during the completion phase (before commit), a new field has been added to fiber called callbackList. The queue is transferred from updateQueue to callbackList during completion. During commit, the list is reset. Need a test to confirm that callbacks are not lost if an update is preempted.
Changed paths6 files
First-parent comparisonsrc/renderers/shared/fiber/ReactFiber.js ModifiedM src/renderers/shared/fiber/ReactFiberBeginWork.js ModifiedM src/renderers/shared/fiber/ReactFiberCommitWork.js ModifiedM src/renderers/shared/fiber/ReactFiberCompleteWork.js ModifiedM src/renderers/shared/fiber/ReactFiberUpdateQueue.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…