Creates a "pre-typed" version of useSelector useSelector where the state type is predefined.
state
This allows you to set the state type once, eliminating the need to specify it with every useSelector useSelector call.
The specific type of state this hook operates on.
A pre-typed useSelector with the state type already defined.
useSelector
export const useAppSelector = useSelector.withTypes<RootState>() Copy
export const useAppSelector = useSelector.withTypes<RootState>()
9.1.0
Generated using TypeDoc
Creates a "pre-typed" version of useSelector useSelector where the
state
type is predefined.This allows you to set the
state
type once, eliminating the need to specify it with every useSelector useSelector call.