usemakedispatchable
Version:
a react hook that takes a set of redux reducers and returns the same input reducers but wrapped with the redux disptch function ready to call
8 lines • 420 B
TypeScript
import type { ActionCreator } from '@reduxjs/toolkit';
declare function useMakeDispatchable<T extends ActionCreator<any>>(reducers: T): T;
declare function useMakeDispatchable<T extends ActionCreator<any>[]>(reducers: T): T;
declare function useMakeDispatchable<T extends {
[index: string]: ActionCreator<any>;
}>(reducers: T): T;
export default useMakeDispatchable;
//# sourceMappingURL=useMakeDispatchable.d.ts.map