MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / scheduleCapture

Function scheduleCapture

code/third-party/public/app.js:12577–12591  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

12575 }
12576
12577 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
12578 // TODO: We only support dispatching errors.
12579 var capturedValue = createCapturedValue(value, sourceFiber);
12580 var update = {
12581 expirationTime: expirationTime,
12582 partialState: null,
12583 callback: null,
12584 isReplace: false,
12585 isForced: false,
12586 capturedValue: capturedValue,
12587 next: null
12588 };
12589 insertUpdateIntoFiber(boundaryFiber, update);
12590 scheduleWork(boundaryFiber, expirationTime);
12591 }
12592
12593 function dispatch(sourceFiber, value, expirationTime) {
12594 !(!isWorking || isCommitting) ? invariant(false, 'dispatch: Cannot dispatch during the render phase.') : void 0;

Callers 1

dispatchFunction · 0.70

Calls 3

createCapturedValueFunction · 0.70
insertUpdateIntoFiberFunction · 0.70
scheduleWorkFunction · 0.70

Tested by

no test coverage detected