The project uses an alternative way to implement the official tic-tac-toe tutorial.
- Instead of using the entire
squares
as a state, this project uses playermoves
as a state, andsquares
is deducted from it. - TypeScript
The board status squares
can be deducted from moves
. This makes rolling back pretty easy: just slice moves
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
The index page is located at src/pages/index.tsx.