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

Function scheduleCapture

code/styling/public/app.js:13344–13358  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

13342 }
13343
13344 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
13345 // TODO: We only support dispatching errors.
13346 var capturedValue = createCapturedValue(value, sourceFiber);
13347 var update = {
13348 expirationTime: expirationTime,
13349 partialState: null,
13350 callback: null,
13351 isReplace: false,
13352 isForced: false,
13353 capturedValue: capturedValue,
13354 next: null
13355 };
13356 insertUpdateIntoFiber(boundaryFiber, update);
13357 scheduleWork(boundaryFiber, expirationTime);
13358 }
13359
13360 function dispatch(sourceFiber, value, expirationTime) {
13361 !(!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