mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
15 lines
542 B
JavaScript
15 lines
542 B
JavaScript
import {createStore, applyMiddleware, compose} from 'redux';
|
|
import thunk from 'redux-thunk';
|
|
import rootReducer from '../reducers/index';
|
|
import effects from '../utils/effects';
|
|
import * as plugins from '../utils/plugins';
|
|
import writeMiddleware from './write-middleware';
|
|
|
|
export default () => {
|
|
const enhancer = compose(
|
|
applyMiddleware(thunk, plugins.middleware, thunk, writeMiddleware, effects),
|
|
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
|
);
|
|
|
|
return createStore(rootReducer, enhancer);
|
|
};
|