feat: add custom hooks for typed useDispatch and useSelector
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import { useDispatch, useSelector } from "react-redux"
|
||||
import type { AppDispatch, RootState } from "./index"
|
||||
|
||||
export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
|
||||
export const useAppSelector = useSelector.withTypes<RootState>()
|
||||
|
||||
Reference in New Issue
Block a user