Skip to content

Commit 1a4183a

Browse files
fix: typo for issue #7491 (#7493)
1 parent 34e13df commit 1a4183a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export default function Square() {
295295
}
296296
```
297297

298-
The _browser_ section should be displaying a square with a X in it like this:
298+
The _browser_ section should be displaying a square with an X in it like this:
299299

300300
![x-filled square](../images/tutorial/x-filled-square.png)
301301

@@ -1325,7 +1325,7 @@ Let's recap what happens when a user clicks the top left square on your board to
13251325
1. `handleClick` uses the argument (`0`) to update the first element of the `squares` array from `null` to `X`.
13261326
1. The `squares` state of the `Board` component was updated, so the `Board` and all of its children re-render. This causes the `value` prop of the `Square` component with index `0` to change from `null` to `X`.
13271327
1328-
In the end the user sees that the upper left square has changed from empty to having a `X` after clicking it.
1328+
In the end the user sees that the upper left square has changed from empty to having an `X` after clicking it.
13291329
13301330
<Note>
13311331
@@ -1406,7 +1406,7 @@ But wait, there's a problem. Try clicking on the same square multiple times:
14061406
14071407
The `X` is overwritten by an `O`! While this would add a very interesting twist to the game, we're going to stick to the original rules for now.
14081408
1409-
When you mark a square with a `X` or an `O` you aren't first checking to see if the square already has a `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has a `X` or an `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
1409+
When you mark a square with an `X` or an `O` you aren't first checking to see if the square already has an `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has an `X` or an `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
14101410
14111411
```js {2,3,4}
14121412
function handleClick(i) {
@@ -1556,7 +1556,7 @@ It does not matter whether you define `calculateWinner` before or after the `Boa
15561556
15571557
</Note>
15581558
1559-
You will call `calculateWinner(squares)` in the `Board` component's `handleClick` function to check if a player has won. You can perform this check at the same time you check if a user has clicked a square that already has a `X` or and `O`. We'd like to return early in both cases:
1559+
You will call `calculateWinner(squares)` in the `Board` component's `handleClick` function to check if a player has won. You can perform this check at the same time you check if a user has clicked a square that already has an `X` or an `O`. We'd like to return early in both cases:
15601560
15611561
```js {2}
15621562
function handleClick(i) {

0 commit comments

Comments
 (0)