MCPcopy Index your code
hub / github.com/tastejs/todomvc / commitUpdateQueue

Function commitUpdateQueue

examples/typescript-react/js/bundle.js:12140–12161  ·  view source on GitHub ↗
(finishedWork, finishedQueue, instance, renderExpirationTime)

Source from the content-addressed store, hash-verified

12138}
12139
12140function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) {
12141 // If the finished render included captured updates, and there are still
12142 // lower priority updates left over, we need to keep the captured updates
12143 // in the queue so that they are rebased and not dropped once we process the
12144 // queue again at the lower priority.
12145 if (finishedQueue.firstCapturedUpdate !== null) {
12146 // Join the captured update list to the end of the normal list.
12147 if (finishedQueue.lastUpdate !== null) {
12148 finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate;
12149 finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate;
12150 }
12151 // Clear the list of captured updates.
12152 finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null;
12153 }
12154
12155 // Commit the effects
12156 commitUpdateEffects(finishedQueue.firstEffect, instance);
12157 finishedQueue.firstEffect = finishedQueue.lastEffect = null;
12158
12159 commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
12160 finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
12161}
12162
12163function commitUpdateEffects(effect, instance) {
12164 while (effect !== null) {

Callers 1

commitLifeCyclesFunction · 0.85

Calls 1

commitUpdateEffectsFunction · 0.85

Tested by

no test coverage detected