diff options
| author | Max Nanis | 2025-05-28 04:41:37 +0100 |
|---|---|---|
| committer | Max Nanis | 2025-05-28 04:41:37 +0100 |
| commit | 8caa77413ea372e5cbd2980a9922d701af359c04 (patch) | |
| tree | 9341e2f70fab6b2678fdff53c002954ef69c7b3e /src/hooks.ts | |
| download | panel-ui-8caa77413ea372e5cbd2980a9922d701af359c04.tar.gz panel-ui-8caa77413ea372e5cbd2980a9922d701af359c04.zip | |
initial commit
Diffstat (limited to 'src/hooks.ts')
| -rw-r--r-- | src/hooks.ts | 7 |
1 files changed, 7 insertions, 0 deletions
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<AppDispatch>() +export const useAppSelector = useSelector.withTypes<RootState>()
\ No newline at end of file |
