Simplify shouldComponentUpdate example [skip ci]

This commit is contained in:
Paul O’Shannessy
2014-07-11 15:32:48 -07:00
parent b6aa3a88c2
commit b44d2ae79f

View File

@@ -164,7 +164,7 @@ transition to the new props and state will not require a component update.
```javascript
shouldComponentUpdate: function(nextProps, nextState) {
return !equal(nextProps, this.props) || !equal(nextState, this.state);
return nextProps.id !== this.props.id;
}
```