diff --git a/src/store/hooks.ts b/src/store/hooks.ts index a1a7827b..2117db80 100644 --- a/src/store/hooks.ts +++ b/src/store/hooks.ts @@ -1,7 +1,7 @@ -import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; import type { RootState, AppDispatch } from './index'; // Use throughout your app instead of plain `useDispatch` and `useSelector` -export const useAppDispatch: () => AppDispatch = useDispatch; -export const useAppSelector: TypedUseSelectorHook = useSelector; +export const useAppDispatch = useDispatch.withTypes(); +export const useAppSelector = useSelector.withTypes();