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

Function scheduleCapture

code/one-direction-data-flow/public/app.js:13217–13231  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

13215 }
13216
13217 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
13218 // TODO: We only support dispatching errors.
13219 var capturedValue = createCapturedValue(value, sourceFiber);
13220 var update = {
13221 expirationTime: expirationTime,
13222 partialState: null,
13223 callback: null,
13224 isReplace: false,
13225 isForced: false,
13226 capturedValue: capturedValue,
13227 next: null
13228 };
13229 insertUpdateIntoFiber(boundaryFiber, update);
13230 scheduleWork(boundaryFiber, expirationTime);
13231 }
13232
13233 function dispatch(sourceFiber, value, expirationTime) {
13234 !(!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