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

Function scheduleCapture

code/event-handlers/public/app.js:12674–12688  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

12672 }
12673
12674 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
12675 // TODO: We only support dispatching errors.
12676 var capturedValue = createCapturedValue(value, sourceFiber);
12677 var update = {
12678 expirationTime: expirationTime,
12679 partialState: null,
12680 callback: null,
12681 isReplace: false,
12682 isForced: false,
12683 capturedValue: capturedValue,
12684 next: null
12685 };
12686 insertUpdateIntoFiber(boundaryFiber, update);
12687 scheduleWork(boundaryFiber, expirationTime);
12688 }
12689
12690 function dispatch(sourceFiber, value, expirationTime) {
12691 !(!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