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

Function scheduleCapture

code/communication/public/app.js:13379–13393  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

13377 }
13378
13379 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
13380 // TODO: We only support dispatching errors.
13381 var capturedValue = createCapturedValue(value, sourceFiber);
13382 var update = {
13383 expirationTime: expirationTime,
13384 partialState: null,
13385 callback: null,
13386 isReplace: false,
13387 isForced: false,
13388 capturedValue: capturedValue,
13389 next: null
13390 };
13391 insertUpdateIntoFiber(boundaryFiber, update);
13392 scheduleWork(boundaryFiber, expirationTime);
13393 }
13394
13395 function dispatch(sourceFiber, value, expirationTime) {
13396 !(!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