(stateHook, currentStateHook, action)
| 7839 | return updateActionStateImpl(stateHook, currentHook, action); |
| 7840 | } |
| 7841 | function 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 | } |
| 7867 | function actionStateActionEffect(actionQueue, action) { |
| 7868 | actionQueue.action = action; |
| 7869 | } |
no test coverage detected
searching dependent graphs…