From 8caa77413ea372e5cbd2980a9922d701af359c04 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Wed, 28 May 2025 04:41:37 +0100 Subject: initial commit --- src/hooks.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/hooks.ts (limited to 'src/hooks.ts') diff --git a/src/hooks.ts b/src/hooks.ts new file mode 100644 index 0000000..2e13fb8 --- /dev/null +++ b/src/hooks.ts @@ -0,0 +1,7 @@ +// This file serves as a central hub for re-exporting pre-typed Redux hooks. +import { useDispatch, useSelector } from 'react-redux' +import type { AppDispatch, RootState } from '@/store.ts' + +// Use throughout your app instead of plain `useDispatch` and `useSelector` +export const useAppDispatch = useDispatch.withTypes() +export const useAppSelector = useSelector.withTypes() \ No newline at end of file -- cgit v1.2.3