shouldComponentUpdate(nextProps, nextState)
вместоcomponentWillReceiveProps
shouldComponentUpdate(nextProps, nextState) {
if (this.props.a != nextProps.a) {
return false
} else {
return true
}
}
shouldComponentUpdate(nextProps) {
return this.props.a !== nextProps.a;
}