Created
October 24, 2022 09:58
-
-
Save victorbruce/3ab63406179b5ba80ecb5df01da1746d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {TypedUseSelectorHook, useDispatch, useSelector} from "react-redux" | |
import type {RootState, AppDispatch} from "store" | |
// use throughout your app instead of useDispatch and useSelector | |
export const useAppDispatch: () => AppDispatch = useDispatch | |
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment