Type alias ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>

ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>: ((dispatch, getState, extraArgument) => ReturnType)

Type Parameters

  • ReturnType

    The return type of the thunk's inner function

  • State

    The redux state

  • ExtraThunkArg

    Optional extra argument passed to the inner function (if specified when setting up the Thunk middleware)

  • BasicAction extends Action

    The (non-thunk) actions that can be dispatched.

Type declaration

    • (dispatch, getState, extraArgument): ReturnType
    • A "thunk" action (a callback function that can be dispatched to the Redux store.)

      Also known as the "thunk inner function", when used with the typical pattern of an action creator function that returns a thunk action.

      Parameters

      • dispatch: ThunkDispatch<State, ExtraThunkArg, BasicAction>
      • getState: (() => State)
          • (): State
          • Returns State

      • extraArgument: ExtraThunkArg

      Returns ReturnType

Generated using TypeDoc