From e0ce72f5134441ac7de543ee6d08d327d3d08345 Mon Sep 17 00:00:00 2001 From: Jeffrey Wan Date: Wed, 1 Feb 2017 20:42:19 -0500 Subject: [PATCH] Update tutorial.md (#8792) * Update tutorial.md * Fix quoting to be consistent --- tutorial/tutorial.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tutorial/tutorial.md b/tutorial/tutorial.md index f5b97694..dcc11bb5 100644 --- a/tutorial/tutorial.md +++ b/tutorial/tutorial.md @@ -293,6 +293,12 @@ handleClick(i) { Now X and O take turns. Next, change the "status" text in Board's `render` so that it also displays who is next. +```javascript +render() { + const status = 'Next player: ' + (this.state.xIsNext ? 'X' : 'O'); + ... +``` + ## Declaring a Winner 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: