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

Function scheduleCapture

code/new-context-api/public/app.js:12705–12719  ·  view source on GitHub ↗
(sourceFiber, boundaryFiber, value, expirationTime)

Source from the content-addressed store, hash-verified

12703 }
12704
12705 function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
12706 // TODO: We only support dispatching errors.
12707 var capturedValue = createCapturedValue(value, sourceFiber);
12708 var update = {
12709 expirationTime: expirationTime,
12710 partialState: null,
12711 callback: null,
12712 isReplace: false,
12713 isForced: false,
12714 capturedValue: capturedValue,
12715 next: null
12716 };
12717 insertUpdateIntoFiber(boundaryFiber, update);
12718 scheduleWork(boundaryFiber, expirationTime);
12719 }
12720
12721 function dispatch(sourceFiber, value, expirationTime) {
12722 !(!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