You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1195,7 +1195,7 @@ export default function Board() {
1195
1195
1196
1196
Notice the new `() =>` syntax. Here, `() =>handleClick(0)` is an *arrow function,* which is a shorter way to define functions. When the square is clicked, the code after the `=>` "arrow" will run, calling `handleClick(0)`.
1197
1197
1198
-
Now you need to update the other eight squares to call `handleClick` from the arrow functions you pass. Make sure that the argument for each call the `handleClick` corresponds to the index of the correct square:
1198
+
Now you need to update the other eight squares to call `handleClick` from the arrow functions you pass. Make sure that the argument for each call of the `handleClick` corresponds to the index of the correct square:
1199
1199
1200
1200
```js {6-8,11-13,16-18}
1201
1201
exportdefaultfunctionBoard() {
@@ -2247,7 +2247,7 @@ body {
2247
2247
2248
2248
As you iterate through `history` array inside the function you passed to `map`, the `squares` argument goes through each element of `history`, and the `move` argument goes through each array index: `0`, `1`, `2`, …. (In most cases, you'd need the actual array elements, but in this case you don't use `squares` to render a list of moves.)
2249
2249
2250
-
For each move in the tic-tac-toe game's history, you create a list item `<li>` which contains a button `<button>`. The button has a`onClick` handler which calls a function called `jumpTo` (that you haven't implemented yet).
2250
+
For each move in the tic-tac-toe game's history, you create a list item `<li>` which contains a button `<button>`. The button has an`onClick` handler which calls a function called `jumpTo` (that you haven't implemented yet).
2251
2251
2252
2252
For now, you should see a list of the moves that occurred in the game and an error in the developer tools console.
0 commit comments