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

Function enqueueUpdate

docs/external/js/react-dom.development.js:12327–12355  ·  view source on GitHub ↗
(fiber, update)

Source from the content-addressed store, hash-verified

12325 return update;
12326 }
12327 function enqueueUpdate(fiber, update) {
12328 var updateQueue = fiber.updateQueue;
12329
12330 if (updateQueue === null) {
12331 // Only occurs if the fiber has been unmounted.
12332 return;
12333 }
12334
12335 var sharedQueue = updateQueue.shared;
12336 var pending = sharedQueue.pending;
12337
12338 if (pending === null) {
12339 // This is the first update. Create a circular list.
12340 update.next = update;
12341 } else {
12342 update.next = pending.next;
12343 pending.next = update;
12344 }
12345
12346 sharedQueue.pending = update;
12347
12348 {
12349 if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
12350 error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
12351
12352 didWarnUpdateInsideUpdate = true;
12353 }
12354 }
12355 }
12356 function enqueueCapturedUpdate(workInProgress, update) {
12357 var current = workInProgress.alternate;
12358

Callers 6

propagateContextChangeFunction · 0.85
throwExceptionFunction · 0.85
captureCommitPhaseErrorFunction · 0.85
updateContainerFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected