react.dev
react.dev copied to clipboard
React Docs Beta - Tutorial: Tic-Tac-Toe
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: