Skip to content

Commit 349e0f0

Browse files
committed
Remove unused TypedUseSelectorHook imports
1 parent 78cdeac commit 349e0f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/tutorials/typescript.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import type { RootState, AppDispatch } from './store'
8484

8585
// highlight-start
8686
// Use throughout your app instead of plain `useDispatch` and `useSelector`
87-
export const useAppDispatch = useDispatch.withTypes<RootState>()
87+
export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
8888
export const useAppSelector = useSelector.withTypes<RootState>()
8989
// highlight-end
9090
```

docs/using-react-redux/usage-with-typescript.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ While it's possible to import the `RootState` and `AppDispatch` types into each
6464
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.
6565
6666
```ts title="app/hooks.ts"
67-
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'
67+
import { useDispatch, useSelector } from 'react-redux'
6868
import type { RootState, AppDispatch } from './store'
6969

7070
// highlight-start
7171
// Use throughout your app instead of plain `useDispatch` and `useSelector`
72-
export const useAppDispatch = useDispatch.withTypes<RootState>()
72+
export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
7373
export const useAppSelector = useSelector.withTypes<RootState>()
7474
// highlight-end
7575
```

0 commit comments

Comments
 (0)