Skip to content

Commit 24354a6

Browse files
jhujhultimdorr
authored andcommitted
Fix code example in static-types.md (#1476)
The code example showing how to use a typed useSelect does not use useTypedSelector but the useSelect hook.
1 parent 5402f24 commit 24354a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/versioned_docs/version-7.1/using-react-redux/static-types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const useTypedSelector: TypedUseSelectorHook<RootState> = useSelector
6161
// my-component.tsx
6262
import { useTypedSelector } from './reducer.ts'
6363

64-
const isOn = useSelector(state => state.isOn)
64+
const isOn = useTypedSelector(state => state.isOn)
6565
```
6666

6767
### Typing the `useDispatch` hook

0 commit comments

Comments
 (0)