diff --git a/docs/docs/10.8-pure-render-mixin.md b/docs/docs/10.8-pure-render-mixin.md index 708a0368012ab..724d784cbca5d 100644 --- a/docs/docs/10.8-pure-render-mixin.md +++ b/docs/docs/10.8-pure-render-mixin.md @@ -1,6 +1,6 @@ --- id: pure-render-mixin -title: PureRenderMixin +title: PureRenderMixin and React.PureComponent permalink: docs/pure-render-mixin.html prev: update.html next: perf.html @@ -21,24 +21,18 @@ React.createClass({ }); ``` -Example using ES6 class syntax: +Under the hood, the mixin implements [shouldComponentUpdate](/react/docs/component-specs.html#updating-shouldcomponentupdate), in which it compares the current props and state with the next ones and returns `false` if the equalities pass. -```js -import PureRenderMixin from 'react-addons-pure-render-mixin'; -class FooComponent extends React.Component { - constructor(props) { - super(props); - this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this); - } +When using ES6 class syntax, you can instead use the `React.PureComponent` base class, which achieves the same result: +```js +class FooComponent extends React.PureComponent { render() { return