diff --git a/package-lock.json b/package-lock.json index 6a6f3fb..fcd0ffb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4332,6 +4332,11 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" + }, "deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -11495,6 +11500,14 @@ } } }, + "redux-logger": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", + "requires": { + "deep-diff": "^0.3.5" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", diff --git a/package.json b/package.json index a4b190b..978e88a 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "react-router": "^1.0.3", "react-scripts": "^3.4.1", "redux": "^4.0.5", + "redux-logger": "^3.0.6", "request": "^2.88.0", "serve": "^10.1.2" }, diff --git a/src/index.js b/src/index.js index 8a1bec2..e2b569d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,14 +1,18 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { createStore } from 'redux'; +import { createStore, applyMiddleware } from 'redux'; import { Provider } from 'react-redux'; +import logger from 'redux-logger'; import './index.css'; import App from './components/App'; import registerServiceWorker from './registerServiceWorker'; import reducer from './store/reducers/app'; -const store = createStore(reducer); +const store = createStore( + reducer, + applyMiddleware(logger) +); ReactDOM.render( , document.getElementById('root'));