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

Function updateActionStateImpl

docs/index.js:7841–7866  ·  view source on GitHub ↗
(stateHook, currentStateHook, action)

Source from the content-addressed store, hash-verified

7839 return updateActionStateImpl(stateHook, currentHook, action);
7840}
7841function updateActionStateImpl(stateHook, currentStateHook, action) {
7842 currentStateHook = updateReducerImpl(
7843 stateHook,
7844 currentStateHook,
7845 actionStateReducer
7846 )[0];
7847 stateHook = updateReducer(basicStateReducer)[0];
7848 currentStateHook =
7849 "object" === typeof currentStateHook &&
7850 null !== currentStateHook &&
7851 "function" === typeof currentStateHook.then
7852 ? useThenable(currentStateHook)
7853 : currentStateHook;
7854 var actionQueueHook = updateWorkInProgressHook(),
7855 actionQueue = actionQueueHook.queue,
7856 dispatch = actionQueue.dispatch;
7857 action !== actionQueueHook.memoizedState &&
7858 ((currentlyRenderingFiber$1.flags |= 2048),
7859 pushEffect(
7860 9,
7861 actionStateActionEffect.bind(null, actionQueue, action),
7862 { destroy: void 0 },
7863 null
7864 ));
7865 return [currentStateHook, dispatch, stateHook];
7866}
7867function actionStateActionEffect(actionQueue, action) {
7868 actionQueue.action = action;
7869}

Callers 2

updateActionStateFunction · 0.85
rerenderActionStateFunction · 0.85

Calls 5

updateReducerImplFunction · 0.85
updateReducerFunction · 0.85
useThenableFunction · 0.85
updateWorkInProgressHookFunction · 0.85
pushEffectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…