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

Function scheduleCapture

code/controlled-uncontrolled/public/app.js:12668–12682  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

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