Skip to content

Commit

Permalink
Fix code example in static-types.md (#1476)
Browse files Browse the repository at this point in the history
The code example showing how to use a typed useSelect does not use useTypedSelector but the useSelect hook.
  • Loading branch information
jhujhul authored and timdorr committed Nov 28, 2019
1 parent 5402f24 commit 24354a6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -61,7 +61,7 @@ export const useTypedSelector: TypedUseSelectorHook<RootState> = useSelector
// my-component.tsx
import { useTypedSelector } from './reducer.ts'

const isOn = useSelector(state => state.isOn)
const isOn = useTypedSelector(state => state.isOn)
```

### Typing the `useDispatch` hook
Expand Down

0 comments on commit 24354a6

Please sign in to comment.