refactor(actions): use createAction util function

This commit is contained in:
moklick
2021-01-28 16:33:53 +01:00
parent 23c2c49e52
commit 835d539108
8 changed files with 164 additions and 457 deletions
+2 -1
View File
@@ -2,9 +2,10 @@ import { applyMiddleware, compose, createStore, Store } from 'redux';
import thunkMiddleware from 'redux-thunk';
import { ReactFlowState } from '../types';
import { ReactFlowAction } from './actions';
import reactFlowReducer from './reducer';
export default function configureStore(preloadedState: ReactFlowState): Store<ReactFlowState> {
export default function configureStore(preloadedState: ReactFlowState): Store<ReactFlowState, ReactFlowAction> {
const composedEnhancers = compose(applyMiddleware(thunkMiddleware));
const store = createStore(reactFlowReducer, preloadedState, composedEnhancers);