Type alias ActionCreator<Payload>

ActionCreator<Payload>: ((payload?: Payload) => PayloadAction)

Type Parameters

  • Payload = undefined

Type declaration

    • (payload?: Payload): PayloadAction
    • Defines a type for an action creator function that may accept a payload of a given type, which is optional.

      Typeparam

      Payload - The type of the action's payload, which defaults to undefined.

      Returns

      An object of type AnyAction that represents the dispatched action.

      Parameters

      • Optional payload: Payload

        The optional payload for the action.

      Returns PayloadAction

Generated using TypeDoc