Skip to content

Commit a80cf0c

Browse files
authored
Merge pull request #1222 from alexilyaev/patch-1
Fix wrong method name in examples for no-will-update-set-state
2 parents 5aa4470 + d414bb7 commit a80cf0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/rules/no-will-update-set-state.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The following patterns are considered warnings:
6363

6464
```jsx
6565
var Hello = createReactClass({
66-
componentDidUpdate: function() {
66+
componentWillUpdate: function() {
6767
this.setState({
6868
name: this.props.name.toUpperCase()
6969
});
@@ -76,7 +76,7 @@ var Hello = createReactClass({
7676

7777
```jsx
7878
var Hello = createReactClass({
79-
componentDidUpdate: function() {
79+
componentWillUpdate: function() {
8080
this.prepareHandler(function callback(newName) {
8181
this.setState({
8282
name: newName

0 commit comments

Comments
 (0)