Skip to content

Commit

Permalink
Merge pull request #1926 from patel-himanshu/docs/simplify-useappdisp…
Browse files Browse the repository at this point in the history
…atch

Simplify the useAppDispatch definition
  • Loading branch information
markerikson committed Jun 14, 2022
2 parents 7882dfc + f0a2977 commit 2dc6c4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import type { RootState, AppDispatch } from './store'

// highlight-start
// Use throughout your app instead of plain `useDispatch` and `useSelector`
export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppDispatch: () => AppDispatch = useDispatch
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector
// highlight-end
```
Expand Down
2 changes: 1 addition & 1 deletion docs/using-react-redux/usage-with-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import type { RootState, AppDispatch } from './store'

// highlight-start
// Use throughout your app instead of plain `useDispatch` and `useSelector`
export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppDispatch: () => AppDispatch = useDispatch
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector
// highlight-end
```
Expand Down

0 comments on commit 2dc6c4e

Please sign in to comment.