diff --git a/docs/tutorials/typescript.md b/docs/tutorials/typescript.md index 4ca2f276b..6f52c5df8 100644 --- a/docs/tutorials/typescript.md +++ b/docs/tutorials/typescript.md @@ -84,7 +84,7 @@ import type { RootState, AppDispatch } from './store' // highlight-start // Use throughout your app instead of plain `useDispatch` and `useSelector` -export const useAppDispatch = useDispatch.withTypes() +export const useAppDispatch = useDispatch.withTypes() export const useAppSelector = useSelector.withTypes() // highlight-end ``` diff --git a/docs/using-react-redux/usage-with-typescript.md b/docs/using-react-redux/usage-with-typescript.md index aa4d0315c..8d4a45d5e 100644 --- a/docs/using-react-redux/usage-with-typescript.md +++ b/docs/using-react-redux/usage-with-typescript.md @@ -64,12 +64,12 @@ While it's possible to import the `RootState` and `AppDispatch` types into each Since these are actual variables, not types, it's important to define them in a separate file such as `app/hooks.ts`, not the store setup file. This allows you to import them into any component file that needs to use the hooks, and avoids potential circular import dependency issues. ```ts title="app/hooks.ts" -import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' +import { useDispatch, useSelector } from 'react-redux' import type { RootState, AppDispatch } from './store' // highlight-start // Use throughout your app instead of plain `useDispatch` and `useSelector` -export const useAppDispatch = useDispatch.withTypes() +export const useAppDispatch = useDispatch.withTypes() export const useAppSelector = useSelector.withTypes() // highlight-end ```