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

Function scheduleCapture

code/dependency-injection/public/app.js:13437–13451  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

13435 }
13436
13437 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
13438 // TODO: We only support dispatching errors.
13439 var capturedValue = createCapturedValue(value, sourceFiber);
13440 var update = {
13441 expirationTime: expirationTime,
13442 partialState: null,
13443 callback: null,
13444 isReplace: false,
13445 isForced: false,
13446 capturedValue: capturedValue,
13447 next: null
13448 };
13449 insertUpdateIntoFiber(boundaryFiber, update);
13450 scheduleWork(boundaryFiber, expirationTime);
13451 }
13452
13453 function dispatch(sourceFiber, value, expirationTime) {
13454 !(!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