MCPcopy Index your code
hub / github.com/caseywebdev/react-list / dispatchOptimisticSetState

Function dispatchOptimisticSetState

docs/index.js:8198–8218  ·  view source on GitHub ↗
(fiber, throwIfDuringRender, queue, action)

Source from the content-addressed store, hash-verified

8196 return !1;
8197}
8198function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
8199 action = {
8200 lane: 2,
8201 revertLane: requestTransitionLane(),
8202 action: action,
8203 hasEagerState: !1,
8204 eagerState: null,
8205 next: null
8206 };
8207 if (isRenderPhaseUpdate(fiber)) {
8208 if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
8209 } else
8210 (throwIfDuringRender = enqueueConcurrentHookUpdate(
8211 fiber,
8212 queue,
8213 action,
8214 2
8215 )),
8216 null !== throwIfDuringRender &&
8217 scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
8218}
8219function isRenderPhaseUpdate(fiber) {
8220 var alternate = fiber.alternate;
8221 return (

Callers 1

startTransitionFunction · 0.85

Calls 6

requestTransitionLaneFunction · 0.85
isRenderPhaseUpdateFunction · 0.85
formatProdErrorMessageFunction · 0.85
scheduleUpdateOnFiberFunction · 0.85
markStateUpdateScheduledFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…