From 349e0f0f9d67b3b71691c8d1b2f5dcb01575128b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 11:04:51 -0600 Subject: [PATCH] Remove unused `TypedUseSelectorHook` imports --- docs/tutorials/typescript.md | 2 +- docs/using-react-redux/usage-with-typescript.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 ```