Skip to content

Commit

Permalink
Implement Redux DevTools extension
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Nov 8, 2015
1 parent 37c5c1c commit 6c146a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/counter/store/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/store/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c146a2

Please sign in to comment.