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

Function scheduleCapture

code/higher-order-components/public/app.js:13338–13352  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

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