Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "actions/index"

Index

Functions

Const createDataAction

  • createDataAction(key: string, data: object): DataAction
  • A function returns a DataAction, based off of successful API calls made by the apiMiddleware.

    Parameters

    • key: string

      A string value that namespaces the action type.

    • data: object

      The data of a response returned by a successful network request made by the apiMiddleware.

    Returns DataAction

    A DataAction which changes the state of the Redux Store based off of a successful network request.

Const createErrorAction

  • A function returns a ErrorAction, based off of failed API calls made by the apiMiddleware.

    Parameters

    • key: string

      A string value that namespaces the action type.

    • error: RequestError

      An error message returned by a failed network request made by the apiMiddleware.

    Returns ErrorAction

    An ErrorAction which changes the state of the Redux Store based off of a failed network request.

Const createRequestAction

  • createRequestAction(key: string, axiosRequestConfig: AxiosRequestConfig): RequestAction
  • A function that return a RequestAction, which interacts with the API asynchronously.

    Parameters

    • key: string

      A string value that namespaces the action type.

    • axiosRequestConfig: AxiosRequestConfig

      a body object, is based off of AxiosRequestConfig from axios, which is for configuring network requests.

    Returns RequestAction

    A RequestAction which interacts with the API server via apiMiddleware.

Generated using TypeDoc