Duration
5 min
Access
Pro
Transcript
Available

In order to update our UI when a user interacts with the buttons, we need to store and update the tic-tac-toe grid data somehow. We're going to use the React.useReducer hook to accomplish this.

With this hook, we are able to store some data (including our grid) and define actions that update that data. We'll work on adding a CLICK case to our reducer that will update the grid with either an X or an O according to whose turn it is.