MCPcopy Index your code
hub / github.com/microsoft/SandDance / enqueueCapturedUpdate

Function enqueueCapturedUpdate

docs/external/js/react-dom.development.js:12356–12376  ·  view source on GitHub ↗
(workInProgress, update)

Source from the content-addressed store, hash-verified

12354 }
12355 }
12356 function enqueueCapturedUpdate(workInProgress, update) {
12357 var current = workInProgress.alternate;
12358
12359 if (current !== null) {
12360 // Ensure the work-in-progress queue is a clone
12361 cloneUpdateQueue(current, workInProgress);
12362 } // Captured updates go only on the work-in-progress queue.
12363
12364
12365 var queue = workInProgress.updateQueue; // Append the update to the end of the list.
12366
12367 var last = queue.baseQueue;
12368
12369 if (last === null) {
12370 queue.baseQueue = update.next = update;
12371 update.next = update;
12372 } else {
12373 update.next = last.next;
12374 last.next = update;
12375 }
12376 }
12377
12378 function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
12379 switch (update.tag) {

Callers 1

throwExceptionFunction · 0.85

Calls 1

cloneUpdateQueueFunction · 0.85

Tested by

no test coverage detected