You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*
if (gameState[itemNumber] === 'empty') {
gameState[itemNumber] = isCross ? 'cross': 'circle'
setIsCross(!isCross)
}
*/
Isn't mutating the array which is a state violates the principles of react. https://react.dev/learn/updating-arrays-in-state
The text was updated successfully, but these errors were encountered:
/*
if (gameState[itemNumber] === 'empty') {
gameState[itemNumber] = isCross ? 'cross': 'circle'
setIsCross(!isCross)
}
*/
Isn't mutating the array which is a state violates the principles of react.
https://react.dev/learn/updating-arrays-in-state
The text was updated successfully, but these errors were encountered: