create-next-core-base
Version:
CLI tool to create Next Base projects with feature selection
9 lines (6 loc) • 398 B
text/typescript
import { AppDispatch, RootState } from "@/store";
import { useDispatch, useSelector } from "react-redux";
// Custom typed version of useDispatch to use AppDispatch type from your store
export const useAppDispatch = useDispatch.withTypes<AppDispatch>();
// Custom typed version of useSelector to use RootState type from your store
export const useAppSelector = useSelector.withTypes<RootState>();