-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
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
Adah's #72
base: main
Are you sure you want to change the base?
Adah's #72
Conversation
// let currentPlayer = player_1; | ||
// let winner = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused code
let resetBoard = generateSquares(); | ||
setCurrentPlayer(player1); | ||
setWinner(null); | ||
setSquares(resetBoard); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just say setSquares(generateSquares())
}; | ||
|
||
const onClickCallback = (id) => { | ||
console.log('onclick', id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console log after debugging
</header> | ||
<main> | ||
<Board squares={squares} /> | ||
<Board onClickCallback={boardCallback} squares={squares} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you can just reference the function in the curly braces instead of making a separate variable. So onClickCallback={onClickCallback}
Good Job Adah! I just added a few comments on what you can refactor. Also, when pushing your final code do a final walk-through of code to remove console logs and commented code. |
No description provided.