Remove react-addons-shallow-compare
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import shallowCompare from "react-addons-shallow-compare"
|
||||
import React, { PureComponent, PropTypes } from "react"
|
||||
import { getList } from "core/utils"
|
||||
import * as CustomPropTypes from "core/proptypes"
|
||||
|
||||
//import "less/opblock"
|
||||
|
||||
export default class Operation extends React.Component {
|
||||
export default class Operation extends PureComponent {
|
||||
static propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
method: PropTypes.string.isRequired,
|
||||
@@ -70,10 +69,6 @@ export default class Operation extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
shouldComponentUpdate(props, state) {
|
||||
return shallowCompare(this, props, state)
|
||||
}
|
||||
|
||||
toggleShown =() => {
|
||||
let { layoutActions, isShownKey } = this.props
|
||||
layoutActions.show(isShownKey, !this.isShown())
|
||||
|
||||
Reference in New Issue
Block a user