scrimba
Tic Tac Toe
Create the handleClick function
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Create the handleClick function
AboutCommentsNotes
Create the handleClick function
Expand for more info
components
Game.js
run
preview
console
import React, { useState } from 'react';
import { calculateWinner } from '../helpers';
import Board from './Board';

const Game = () => {
const [board, setBoard] = useState(Array(9).fill(null));
const [xIsNext, setXisNext] = useState(true);
const winner = calculateWinner(board);

const handleClick = () => {

}

const jumpTo = () => {

}

const renderMoves = () => {

}

return (
<Board squares={board} onClick={handleClick} />
)
}

export default Game;
Console
/index.html
-3:49