-
Notifications
You must be signed in to change notification settings - Fork 280
Open
Description
/*
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
Metadata
Metadata
Assignees
Labels
No labels