Simplify shouldComponentUpdate example [skip ci]
Paul O’Shannessy committed
Jul 11, 2014 at 15:32 UTC
4526f627f2a526ccb538753c7266249eb16c3446
1 file changed
+1
-1
docs/docs/ref-03-component-specs.md
+1
-1
@@ -164,7 +164,7 @@ transition to the new props and state will not require a component update.
164
165
```javascript
166
shouldComponentUpdate: function(nextProps, nextState) {
167
- return !equal(nextProps, this.props) || !equal(nextState, this.state);
167
+ return nextProps.id !== this.props.id;
168
}
169
```
170