Update tutorial.md (#8792)
* Update tutorial.md * Fix quoting to be consistent
Jeffrey Wan committed
Feb 1, 2017 at 20:42 UTC
3f5482ee203472e65d4cb9a67ffbfb4d6be713bc
1 file changed
+6
docs/tutorial/tutorial.md
+6
@@ -293,6 +293,12 @@ handleClick(i) {
293
294
Now X and O take turns. Next, change the "status" text in Board's `render` so that it also displays who is next.
295
296
+```javascript
297
+render() {
298
+ const status = 'Next player: ' + (this.state.xIsNext ? 'X' : 'O');
299
+ ...
300
+```
301
+
302
## Declaring a Winner
303
304
Let's show when the game is won. A `calculateWinner(squares)` helper function that takes the list of 9 values has been provided for you at the bottom of the file. You can call it in Board's `render` function to check if anyone has won the game and make the status text show "Winner: [X/O]" when someone wins: