diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/redux/store.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gui/src/renderer/redux/store.ts b/gui/src/renderer/redux/store.ts index 3579978425..79700497c6 100644 --- a/gui/src/renderer/redux/store.ts +++ b/gui/src/renderer/redux/store.ts @@ -1,3 +1,4 @@ +import { useSelector as useReduxSelector } from 'react-redux'; import { combineReducers, compose, createStore, Dispatch } from 'redux'; import accountActions, { AccountAction } from './account/actions'; @@ -62,3 +63,7 @@ function composeEnhancers(): typeof compose { (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ actionCreators })() : compose(); } + +export function useSelector<R>(fn: (state: IReduxState) => R): R { + return useReduxSelector(fn); +} |
