Skip to content

Commit

Permalink
Add actionCreators option for window.devToolsExtension()
Browse files Browse the repository at this point in the history
add counter actions & push action of `react-router-redux`
  • Loading branch information
jhen0409 committed Aug 4, 2016
1 parent fe4e552 commit 0023d4d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions app/store/configureStore.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import { hashHistory } from 'react-router';
import { routerMiddleware } from 'react-router-redux';
import { routerMiddleware, push } from 'react-router-redux';
import rootReducer from '../reducers';

import * as counterActions from '../actions/counter';

const actionCreators = {
...counterActions,
push,
};

const logger = createLogger({
level: 'info',
collapsed: true,
Expand All @@ -14,7 +21,9 @@ const router = routerMiddleware(hashHistory);

const enhancer = compose(
applyMiddleware(thunk, router, logger),
window.devToolsExtension ? window.devToolsExtension() : noop => noop
window.devToolsExtension ?
window.devToolsExtension({ actionCreators }) :
noop => noop
);

export default function configureStore(initialState) {
Expand Down

0 comments on commit 0023d4d

Please sign in to comment.