diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-10-25 15:25:41 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2017-10-25 15:25:41 +0200 |
commit | 42895f4fec0f914d2ca3696c6962830140610e6e (patch) | |
tree | b9834abcf99feaf9ac113820814b4998ef9daba0 /web/src/js/utils.js | |
parent | f870ccd949ca46e6a1ca48a6d5e40589fad41ce2 (diff) | |
download | mitmproxy-42895f4fec0f914d2ca3696c6962830140610e6e.tar.gz mitmproxy-42895f4fec0f914d2ca3696c6962830140610e6e.tar.bz2 mitmproxy-42895f4fec0f914d2ca3696c6962830140610e6e.zip |
[web] minor fixes and cleanup
Diffstat (limited to 'web/src/js/utils.js')
-rw-r--r-- | web/src/js/utils.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/web/src/js/utils.js b/web/src/js/utils.js index 7c1719ae..80f0c42a 100644 --- a/web/src/js/utils.js +++ b/web/src/js/utils.js @@ -1,6 +1,5 @@ import _ from 'lodash' import React from 'react' -import shallowEqual from 'shallowequal' window._ = _; window.React = React; @@ -126,13 +125,9 @@ export function getDiff(obj1, obj2) { return result } -export const pure = renderFn => class extends React.Component { +export const pure = renderFn => class extends React.PureComponent { static displayName = renderFn.name - shouldComponentUpdate(nextProps) { - return !shallowEqual(this.props, nextProps) - } - render() { return renderFn(this.props) } |