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