MCPcopy Create free account
hub / github.com/plotly/dash / dispatchReducerAction

Function dispatchReducerAction

dash/deps/react-dom@18.3.1.js:16620–16649  ·  view source on GitHub ↗
(fiber, queue, action)

Source from the content-addressed store, hash-verified

16618 }
16619
16620 function dispatchReducerAction(fiber, queue, action) {
16621 {
16622 if (typeof arguments[3] === 'function') {
16623 error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
16624 }
16625 }
16626
16627 var lane = requestUpdateLane(fiber);
16628 var update = {
16629 lane: lane,
16630 action: action,
16631 hasEagerState: false,
16632 eagerState: null,
16633 next: null
16634 };
16635
16636 if (isRenderPhaseUpdate(fiber)) {
16637 enqueueRenderPhaseUpdate(queue, update);
16638 } else {
16639 var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
16640
16641 if (root !== null) {
16642 var eventTime = requestEventTime();
16643 scheduleUpdateOnFiber(root, fiber, lane, eventTime);
16644 entangleTransitionUpdate(root, queue, lane);
16645 }
16646 }
16647
16648 markUpdateInDevTools(fiber, lane);
16649 }
16650
16651 function dispatchSetState(fiber, queue, action) {
16652 {

Callers

nothing calls this directly

Calls 9

errorFunction · 0.70
requestUpdateLaneFunction · 0.70
isRenderPhaseUpdateFunction · 0.70
enqueueRenderPhaseUpdateFunction · 0.70
requestEventTimeFunction · 0.70
scheduleUpdateOnFiberFunction · 0.70
entangleTransitionUpdateFunction · 0.70
markUpdateInDevToolsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…