We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You don't need to put the player variable in state, as you can derive this from the count variable.
player
count
ie you could replace this useEffect
useEffect
week5-Alex-Sumithra-ClientReactApp/src/Components/Board.jsx
Line 26 in 746fba3
with
const player = count % 2 === 0 ? names[0] : names[1]
Stretch goal:
You could also don't need state for the count variable as you can work this out from how many squares have been filled.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
You don't need to put the
player
variable in state, as you can derive this from thecount
variable.ie you could replace this
useEffect
week5-Alex-Sumithra-ClientReactApp/src/Components/Board.jsx
Line 26 in 746fba3
with
const player = count % 2 === 0 ? names[0] : names[1]
Stretch goal:
You could also don't need state for the
count
variable as you can work this out from how many squares have been filled.The text was updated successfully, but these errors were encountered: