react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

React Docs Beta - Tutorial: Tic-Tac-Toe

Open ggert345 opened this issue 2 years ago • 0 comments
trafficstars

Hello,

I think there is an error in the below paragraph. Where I bolded the word(board), should it say square instead? From the docs:

The handleClick(0) call will be a part of rendering the board component. Because handleClick(0) alters the state of the board component by calling setSquares, your entire board component will be re-rendered again. But handleClick(0) is now a part of rendering of the board component, and so you’ve created an infinite loop:

Screenshot:

Screenshot 2023-02-10 at 1 03 34 PM

ggert345 avatar Feb 10 '23 19:02 ggert345