Browse Source

Simplify shouldComponentUpdate example [skip ci]

main
Paul O’Shannessy 11 years ago
parent
commit
b44d2ae79f
  1. 2
      docs/ref-03-component-specs.md

2
docs/ref-03-component-specs.md

@ -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;
}
```

Loading…
Cancel
Save