Skip to content

Commit

Permalink
feat(store): use __REDUX_DEVTOOLS_EXTENSION__ to access Chrome's Redu…
Browse files Browse the repository at this point in the history
…x extension

pass those as the second argument to 'createStore'
  • Loading branch information
aneurysmjs committed Jan 5, 2018
1 parent d7129e9 commit 40f3834
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';

const REDUX_DEVTOOLS = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__();

import reducer from './reducers';

export default createStore(reducer, applyMiddleware(thunk));
export default createStore(reducer, REDUX_DEVTOOLS, applyMiddleware(thunk));

0 comments on commit 40f3834

Please sign in to comment.