From 43c72f445c7906ab707493b3e857acf83d5bcd1f Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Thu, 14 Dec 2017 16:36:23 +0100 Subject: Add redux-logger --- src/client/react/index.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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( -- cgit v1.1