Slides: slides/03_react.pdf Time: 50 minutes (Tune In 5 / Cycle 1 15 / Cycle 2 15 / Cycle 3 15)
slides/03_react.pdf
Get this instruction: https://github.com/ruhendrawan/cs1520_recitation
Work in pairs (coding + reflections).
Keep 3 tabs open:
Pick 1–2 concepts from slides/03_react.pdf that you think you’ll use immediately in the tutorial. For example:
npm create vite@latest
npm install
npm run dev
className
{}
useState
No grammar check. Fast + messy is fine.
We’re doing: https://react.dev/learn/tutorial-tic-tac-toe
In recitation you’ll likely finish part of it. Continue after recitation until you finish.
From the lecture slides:
From the tutorial (tic-tac-toe):
Square
Board
Goal: get a working dev setup + basic click interactivity.
Do:
tictactoe-sandbox.zip
Checkpoint:
Write:
Goal: make the game logic “real” (state + turns + lifting state up).
Goal: history + time travel (even if it’s not polished).
key
In Google Doc:
Then submit: https://forms.gle/tYEtKjJunM1wb2we6
Try one of these (in order):
console.log(...)