Fix typo on tutorial.md. (#9644)

The absence of the word `this` will cause CodePen
to scream at you. This fix should avoid that.
This commit is contained in:
Carolina Powers
2017-05-10 03:23:53 -04:00
committed by Dan Abramov
parent 9215b72a4a
commit 70842889dd

View File

@@ -221,7 +221,7 @@ In [JavaScript classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/
Now change the Square `render` method to display the value from the current state, and to toggle it on click:
* Replace `this.props.value` with `this.state.value` inside the `<button>` tag.
* Replace the `() => alert()` event handler with `() => setState({value: 'X'})`.
* Replace the `() => alert()` event handler with `() => this.setState({value: 'X'})`.
Now the `<button>` tag looks like this: