Premium
Tic-Tac-Toe (Component State + Winner Detection)
Challenge summary
Build Tic-Tac-Toe with React state: a 9-cell board, alternating turns, win/draw detection, and a reset button. Prevent overwriting a filled cell and stop play once the game is over.
What you'll practice
- Render the Tic-Tac-Toe UI as the main component.
- Render a 3×3 board (9 cells).
- Clicking an empty cell places the current player's mark (only if the game is not over).
- Detect a draw when the board is full and there is no winner.
- Show status text (next player / winner / draw).
What Premium unlocks
Premium unlocks the runnable workspace, behavioral checks, implementation walkthrough, and edge-case discussion.
Free related practice
Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.