Remove react-addons-shallow-compare
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import React, { PropTypes, Component } from "react"
|
||||
import shallowCompare from "react-addons-shallow-compare"
|
||||
import React, { PropTypes, PureComponent, Component } from "react"
|
||||
import { List, fromJS } from "immutable"
|
||||
//import "less/json-schema-form"
|
||||
|
||||
@@ -74,7 +73,7 @@ export class JsonSchema_string extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export class JsonSchema_array extends Component {
|
||||
export class JsonSchema_array extends PureComponent {
|
||||
|
||||
static propTypes = JsonSchemaPropShape
|
||||
static defaultProps = JsonSchemaDefaultProps
|
||||
@@ -89,10 +88,6 @@ export class JsonSchema_array extends Component {
|
||||
this.setState({value: props.value})
|
||||
}
|
||||
|
||||
shouldComponentUpdate(props, state) {
|
||||
return shallowCompare(this, props, state)
|
||||
}
|
||||
|
||||
onChange = () => this.props.onChange(this.state.value)
|
||||
|
||||
onItemChange = (itemVal, i) => {
|
||||
|
||||
Reference in New Issue
Block a user