Skip to content

Instantly share code, notes, and snippets.

@GalenCasstevens
Created October 17, 2023 22:01
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
import type { RootState, AppDispatch } from './store';
type DispatchFunc = () => AppDispatch;
export const useAppDispatch: DispatchFunc = useDispatch;
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment