From b44d2ae79fd31abf1ddd4eea3f6aeee6c6661753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Fri, 11 Jul 2014 15:32:48 -0700 Subject: [PATCH] Simplify shouldComponentUpdate example [skip ci] --- docs/ref-03-component-specs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ref-03-component-specs.md b/docs/ref-03-component-specs.md index 0fbfeb64e..debd34519 100644 --- a/docs/ref-03-component-specs.md +++ b/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; } ```