diff --git a/docs/rules/no-will-update-set-state.md b/docs/rules/no-will-update-set-state.md index 6225d2ccaa..8735ffa8ed 100644 --- a/docs/rules/no-will-update-set-state.md +++ b/docs/rules/no-will-update-set-state.md @@ -63,7 +63,7 @@ The following patterns are considered warnings: ```jsx var Hello = createReactClass({ - componentDidUpdate: function() { + componentWillUpdate: function() { this.setState({ name: this.props.name.toUpperCase() }); @@ -76,7 +76,7 @@ var Hello = createReactClass({ ```jsx var Hello = createReactClass({ - componentDidUpdate: function() { + componentWillUpdate: function() { this.prepareHandler(function callback(newName) { this.setState({ name: newName