UNPKG

react-redux-dispatch-async

Version:

hooks & redux middleware to be able to wait async actions with fixed defined suffixes

19 lines (18 loc) 529 B
import { Middleware } from 'redux'; export interface NormalSuffix { request: string; success: string; failure: string; } export interface CancelableSuffix { request: string; success: string; failure: string; cancel: string; } export declare type ActionSuffix = NormalSuffix | CancelableSuffix; export declare const ConfigMiddleware: { suffixes: ActionSuffix; initialized: boolean; }; export declare const createDispatchAsyncMiddleware: (config?: ActionSuffix) => Middleware;