7386 |
stevensc |
1 |
// const { applyMiddleware, createStore } = Redux;
|
|
|
2 |
import { createStore, applyMiddleware, compose } from "redux";
|
|
|
3 |
import logger from "redux-logger";
|
|
|
4 |
import thunk from "redux-thunk";
|
|
|
5 |
import { rootReducer } from "./root-reducer";
|
|
|
6 |
|
|
|
7 |
const middlewares = [thunk];
|
|
|
8 |
|
|
|
9 |
// const store = createStore(rootReducer, /* prealodedState, */ applyMiddleware(logger));
|
|
|
10 |
|
|
|
11 |
/* Remove in production and change to normal createStore */
|
|
|
12 |
const composeEnhancers =
|
|
|
13 |
(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ &&
|
|
|
14 |
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
|
|
|
15 |
trace: true,
|
|
|
16 |
traceLimit: 25,
|
|
|
17 |
})) ||
|
|
|
18 |
compose;
|
|
|
19 |
export const store = createStore(
|
|
|
20 |
rootReducer,
|
|
|
21 |
applyMiddleware(...middlewares)
|
|
|
22 |
);
|