Remove react-addons-shallow-compare

This commit is contained in:
Sven Tschui
2017-06-22 09:46:51 +02:00
parent 23c2682311
commit e4f9837312
9 changed files with 71 additions and 88 deletions

View File

@@ -1,11 +1,10 @@
import React, { Component, PropTypes } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PureComponent, PropTypes } from "react"
import { fromJS, List } from "immutable"
import { getSampleSchema } from "core/utils"
const NOOP = Function.prototype
export default class ParamBody extends Component {
export default class ParamBody extends PureComponent {
static propTypes = {
param: PropTypes.object,
@@ -41,10 +40,6 @@ export default class ParamBody extends Component {
this.updateValues.call(this, this.props)
}
shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}
componentWillReceiveProps(nextProps) {
this.updateValues.call(this, nextProps)
}