22301014 | bc4616f | 2025-06-03 16:59:44 +0800 | [diff] [blame^] | 1 | import { useDispatch, useSelector, type TypedUseSelectorHook } from 'react-redux' |
2 | import type { RootState, AppDispatch } from './store' | ||||
3 | |||||
4 | // 在整个应用程序中使用,而不是简单的 `useDispatch` 和 `useSelector` | ||||
5 | export const useAppDispatch: () => AppDispatch = useDispatch | ||||
6 | export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector |