refactor(store): use redux instead of easy-peasy
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { applyMiddleware, compose, createStore, Store } from 'redux';
|
||||
import thunkMiddleware from 'redux-thunk';
|
||||
|
||||
import { ReactFlowState, reactFlowReducer } from './index';
|
||||
|
||||
export default function configureStore(preloadedState: ReactFlowState): Store<ReactFlowState> {
|
||||
const composedEnhancers = compose(applyMiddleware(thunkMiddleware));
|
||||
const store = createStore(reactFlowReducer, preloadedState, composedEnhancers);
|
||||
|
||||
return store;
|
||||
}
|
||||
Reference in New Issue
Block a user