From 52117a19e2dae42cb0e07e52bad1d8e8a3a6033d Mon Sep 17 00:00:00 2001 From: Alex Windett Date: Mon, 27 Mar 2017 14:20:48 +0100 Subject: [PATCH] Adding in React + Redux Performance monitoring - react-addons-perf - redux-perf middleware - React perf widget for !production environments - React perf in the assinged to window in !production environments - React perf in the assinged to window in !production environments Update NODE to NODE_ENV Adding in React + Redux Performance monitoring --- frontend/package.json | 3 ++ frontend/src/containers/app.js | 31 +++++++----- frontend/src/index.js | 3 ++ frontend/src/perf-profiler/index.js | 78 +++++++++++++++++++++++++++++ frontend/src/state/store.js | 4 +- frontend/yarn.lock | 21 ++++++++ 6 files changed, 126 insertions(+), 14 deletions(-) create mode 100644 frontend/src/perf-profiler/index.js diff --git a/frontend/package.json b/frontend/package.json index 78e6e0c6..e4ab5592 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -97,9 +97,12 @@ "node-hook": "^0.4.0", "nyc": "^10.1.2", "pre-commit": "^1.2.2", + "react-addons-perf": "^15.4.2", "react-addons-test-utils": "^15.4.2", "react-dev-utils": "^0.5.1", + "react-perf": "^1.0.1", "redux-ava": "^2.2.0", + "redux-perf-middleware": "^1.2.2", "require-hacker": "^2.1.4", "simple-mock": "^0.7.3", "style-loader": "^0.13.2", diff --git a/frontend/src/containers/app.js b/frontend/src/containers/app.js index f5e2f594..5f4da0dc 100644 --- a/frontend/src/containers/app.js +++ b/frontend/src/containers/app.js @@ -10,6 +10,7 @@ import Home from '@containers/home'; import NotFound from '@containers/not-found'; import Nav from '@components/navigation'; import OrgNavigation from '@components/navigation/org'; +import PerfProfiler from '../perf-profiler'; import React from 'react'; const App = connect()(React.createClass({ @@ -49,17 +50,21 @@ const App = connect()(React.createClass({ })); export default (props) => ( - -
- -
- - - - -
-