UNPKG

@thecodingmachine/redux-toolkit-wrapper

Version:

[Redux-toolkit](https://redux-toolkit.js.org/) wrapper used to write less code regarding classic CRUD operations

13 lines (12 loc) 421 B
import { AnyAction } from 'redux'; interface DefaultParams { itemKey?: string | undefined | null; loadingKey?: string; errorKey?: string; } export declare function buildAsyncReducers<S>(params: DefaultParams): { pending: (state: S, { type }: AnyAction) => void; fulfilled: (state: S, { payload, type }: AnyAction) => void; rejected: (state: S, { payload, type }: AnyAction) => void; }; export {};