From e0956a02783b0615228f5e2c73252cb563fce437 Mon Sep 17 00:00:00 2001 From: Cory House Date: Mon, 28 Mar 2016 15:40:22 -0500 Subject: [PATCH] Streamlined devTools support config --- src/store/configureStore.dev.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/store/configureStore.dev.js b/src/store/configureStore.dev.js index db9e7133f..aed7457a2 100644 --- a/src/store/configureStore.dev.js +++ b/src/store/configureStore.dev.js @@ -6,12 +6,11 @@ import { createStore } from 'redux'; import rootReducer from '../reducers'; export default function configureStore(initialState) { - let store; - if (window.devToolsExtension) { //Enable Redux devtools if the extension is installed in developer's browser - store = window.devToolsExtension()(createStore)(rootReducer, initialState); - } else { - store = createStore(rootReducer, initialState); - } + let store = createStore(rootReducer, initialState, compose( + // Add other middleware on this line... + window.devToolsExtension ? window.devToolsExtension() : f => f //add support for Redux dev tools + ) + ); if (module.hot) { // Enable Webpack hot module replacement for reducers