27 lines
872 B
JavaScript
27 lines
872 B
JavaScript
import { applyMiddleware, createStore, compose } from 'redux';
|
|
import reducers from './reducers';
|
|
import { catalogMdl } from './middleware/catalog';
|
|
import { tagsMdl } from './middleware/tags';
|
|
import { participateMdl } from './middleware/participate';
|
|
import { api } from './middleware/api';
|
|
import { adsMdl } from './middleware/ads';
|
|
import { uiMdl } from './middleware/ui';
|
|
import { modeMdl } from './middleware/mode';
|
|
import { composeWithDevTools } from 'redux-devtools-extension';
|
|
// dev tool
|
|
// const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
|
const composeEnhancers = composeWithDevTools({ actionCreators: [], trace: true, traceLimit: 25 });
|
|
export default createStore(
|
|
reducers,
|
|
composeEnhancers(
|
|
applyMiddleware(
|
|
...catalogMdl,
|
|
...tagsMdl,
|
|
...adsMdl,
|
|
...participateMdl,
|
|
...uiMdl,
|
|
...modeMdl,
|
|
api
|
|
)
|
|
)
|
|
);
|