idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux"; |
2 | import type { RootState, AppDispatch } from "./store"; | ||||
3 | |||||
4 | // Use throughout your app instead of plain `useDispatch` and `useSelector` | ||||
5 | export const useAppDispatch: () => AppDispatch = useDispatch; | ||||
6 | export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector; |