From 6c146a2e16da79fefdc0e3e33f188d4ee6667341 Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Sun, 8 Nov 2015 22:39:14 +0200 Subject: [PATCH] Implement Redux DevTools extension --- examples/counter/store/configureStore.js | 1 + examples/todomvc/store/configureStore.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/counter/store/configureStore.js b/examples/counter/store/configureStore.js index ca6e734a..bbd28895 100644 --- a/examples/counter/store/configureStore.js +++ b/examples/counter/store/configureStore.js @@ -5,6 +5,7 @@ import reducer from '../reducers'; export default function configureStore(initialState) { const finalCreateStore = compose( applyMiddleware(thunk), + window.devToolsExtension ? window.devToolsExtension() : f => f )(createStore); const store = finalCreateStore(reducer, initialState); diff --git a/examples/todomvc/store/configureStore.js b/examples/todomvc/store/configureStore.js index f9588c43..8f3ddf9c 100644 --- a/examples/todomvc/store/configureStore.js +++ b/examples/todomvc/store/configureStore.js @@ -2,7 +2,7 @@ import { createStore } from 'redux'; import rootReducer from '../reducers'; export default function configureStore(initialState) { - const store = createStore(rootReducer, initialState); + const store = (window.devToolsExtension ? window.devToolsExtension()(createStore) : createStore)(rootReducer, initialState); if (module.hot) { // Enable Webpack hot module replacement for reducers