keycloak-demo-frontend/src/hooks/useDispatch.tsx

10 lines
410 B
TypeScript
Raw Normal View History

2021-09-06 10:00:03 +00:00
import { useDispatch as BaseUseDispatch } from 'react-redux';
import { Action, AnyAction } from 'redux';
import { ThunkDispatch } from 'redux-thunk';
import { StoreState } from '@Reducers/_InitializeStore/types';
export type UseDispatch<T extends Action = AnyAction> = () => ThunkDispatch<StoreState, Record<string, unknown>, T>;
const useDispatch: UseDispatch = BaseUseDispatch;
export default useDispatch;