Skip to content

Commit

Permalink
Streamlined devTools support config
Browse files Browse the repository at this point in the history
  • Loading branch information
coryhouse committed Mar 28, 2016
1 parent 8ce3176 commit e0956a0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/store/configureStore.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0956a0

Please sign in to comment.