UNPKG

@selemondev/create-react-next

Version:

The Next Generation React Scaffolding Tool ✨

7 lines (6 loc) 387 B
import { useDispatch, useSelector } from 'react-redux' import type { TypedUseSelectorHook } from 'react-redux' import type { RootState, AppDispatch } from '../store/appStore' // Use throughout your app instead of plain `useDispatch` and `useSelector` export const useAppDispatch: () => AppDispatch = useDispatch export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector