When someone wins, highlight the three squares that caused the win.
In order to check which three squares caused the win, I edited the calculateWinner() helper function to return an object containing the winning line, in addition to the winning shape (which it already does).
Add a toggle button that lets you sort the moves in either ascending or descending order.
In order to toggle the move sort direction, we need to create a variable to track whether we're currently sorting in ascending or descending order. Adding another property to the Game component's...
Rewrite Board to use two loops to make the squares instead of hardcoding them.
We can rewrite the board using nested loops. We'll use one loop to create three individual squares and another one to take these squares and wrap them in a div. We'll do this last bit three times......
Bold the currently-selected item in the move list.
In order to add this improvement, we need to compare two variables, the currently displayed step number (tracked via the stepNumber property in the Game component's state) and each moves individual step number. We can access this...