From f8686cb6d0fd155574e825a1784372d843ab1fe3 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sat, 24 Mar 2018 15:57:52 +0100 Subject: Remove redux-logger --- package.json | 1 - src/client/react/index.js | 15 +++++++++------ yarn.lock | 10 ---------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 2459fe7..73bdcfd 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "react-redux": "^5.0.6", "react-router-dom": "^4.2.2", "redux": "^3.7.2", - "redux-logger": "^3.0.6", "rmwc": "^1.2.0" }, "devDependencies": { diff --git a/src/client/react/index.js b/src/client/react/index.js index 2443ced..5fa7d0d 100644 --- a/src/client/react/index.js +++ b/src/client/react/index.js @@ -22,9 +22,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; import moment from 'moment'; -import { createStore, applyMiddleware, compose } from 'redux'; +import { createStore } from 'redux'; import { Provider } from 'react-redux'; -import logger from 'redux-logger'; import { BrowserRouter as Router, @@ -39,14 +38,18 @@ import User from './components/page/User'; import './index.scss'; +// Set the locale for moment.js to dutch. This ensures that the correct week +// number logic is used. moment.locale('nl'); -// eslint-disable-next-line no-underscore-dangle -const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; +/* eslint-disable no-underscore-dangle */ const store = createStore( reducer, - composeEnhancers(applyMiddleware(logger)), + // Redux devtools extension + // https://github.com/zalmoxisus/redux-devtools-extension + window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(), ); +/* eslint-enable no-underscore-dangle */ ReactDOM.render( @@ -58,7 +61,7 @@ ReactDOM.render( , - document.getElementById('root'), + document.querySelector('#root'), ); // We only want to focus the input on page load. NOT on a in-javascript diff --git a/yarn.lock b/yarn.lock index 048face..7085411 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2077,10 +2077,6 @@ decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" -deep-diff@^0.3.5: - version "0.3.8" - resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.8.tgz#c01de63efb0eec9798801d40c7e0dae25b582c84" - deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" @@ -5412,12 +5408,6 @@ reduce-function-call@^1.0.1: dependencies: balanced-match "^0.4.2" -redux-logger@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-3.0.6.tgz#f7555966f3098f3c88604c449cf0baf5778274bf" - dependencies: - deep-diff "^0.3.5" - redux@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" -- cgit v1.1