mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 17:34:57 -05:00
fix(ui): useAppStore uses correct types
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import type { AppThunkDispatch, RootState } from 'app/store/store';
|
||||
import type { AppStore, AppThunkDispatch, RootState } from 'app/store/store';
|
||||
import type { TypedUseSelectorHook } from 'react-redux';
|
||||
import { useDispatch, useSelector, useStore } from 'react-redux';
|
||||
|
||||
// Use throughout your app instead of plain `useDispatch` and `useSelector`
|
||||
export const useAppDispatch = () => useDispatch<AppThunkDispatch>();
|
||||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
||||
export const useAppStore = () => useStore<RootState>();
|
||||
export const useAppStore = () => useStore.withTypes<AppStore>()();
|
||||
|
||||
Reference in New Issue
Block a user