housekeeping: remove react-addons-perf dependency (via #5229)
* Remove react-addons-perf dependency * update lockfile * include ReactPerf in non-production builds
This commit is contained in:
@@ -2,7 +2,6 @@ import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { presets } from "react-motion"
|
||||
import ObjectInspector from "react-inspector"
|
||||
import Perf from "react-addons-perf"
|
||||
|
||||
export default class Debug extends React.Component {
|
||||
|
||||
@@ -15,7 +14,6 @@ export default class Debug extends React.Component {
|
||||
e.preventDefault()
|
||||
this.setState({jsonDumpOpen: !this.state.jsonDumpOpen})
|
||||
}
|
||||
window.Perf = Perf
|
||||
}
|
||||
|
||||
plusOrMinus(bool) {
|
||||
@@ -51,4 +49,3 @@ Debug.propTypes = {
|
||||
getState: PropTypes.func.isRequired,
|
||||
getComponent: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as AllPlugins from "core/plugins/all"
|
||||
import { parseSearch } from "core/utils"
|
||||
|
||||
if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") {
|
||||
win.Perf = require("react-addons-perf")
|
||||
win.Perf = require("react-dom/lib/ReactPerf")
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
Reference in New Issue
Block a user