Rev 1 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
// const { applyMiddleware, createStore } = Redux;
import { createStore, applyMiddleware, compose } from 'redux'
import logger from 'redux-logger'
import thunk from 'redux-thunk'
import { rootReducer } from './root-reducer'
const middlewares = [thunk]
// const store = createStore(rootReducer, /* prealodedState, */ applyMiddleware(logger));
/* Remove in production and change to normal createStore */
const composeEnhancers =
(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
trace: true,
traceLimit: 25
})) ||
compose
export const store = createStore(
rootReducer,
applyMiddleware(...middlewares)
)