Files
HKSingleParty/99_references/cf-identity-wallet-main/src/store/hooks.ts
2025-05-28 09:55:51 +08:00

9 lines
380 B
TypeScript

import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
import type { AppDispatch, RootState } from "./index";
// Use throughout your app instead of plain `useDispatch` and `useSelector`
const useAppDispatch = () => useDispatch<AppDispatch>();
const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
export { useAppDispatch, useAppSelector };