aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-12-14 16:36:23 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-12-14 16:36:23 +0100
commit43c72f445c7906ab707493b3e857acf83d5bcd1f (patch)
tree2afa5396a9ee089195856dbf01fc6127c27e1c6d /src/client
parentbb5b3629445ed6a52c3a088dbc2dd08b7a326f8a (diff)
Add redux-logger
Diffstat (limited to 'src/client')
-rw-r--r--src/client/react/index.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/react/index.jsx b/src/client/react/index.jsx
index 8c92bb1..f0e4e23 100644
--- a/src/client/react/index.jsx
+++ b/src/client/react/index.jsx
@@ -2,16 +2,17 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { BrowserRouter as Router, Route } from 'react-router-dom';
-import { createStore } from 'redux';
+import { createStore, applyMiddleware, compose } from 'redux';
+import logger from 'redux-logger';
import reducer from './reducers';
import LandingPage from './LandingPage';
-/* eslint-disable no-underscore-dangle */
+// eslint-disable-next-line no-underscore-dangle
+const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
reducer,
- window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
+ composeEnhancers(applyMiddleware(logger)),
);
-/* eslint-enable */
ReactDOM.render(
<Provider store={store}>