Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Adah's #72

wants to merge 6 commits into from

Conversation

Aghaile
Copy link

@Aghaile Aghaile commented Jan 4, 2022

No description provided.

Comment on lines +35 to +36
// let currentPlayer = player_1;
// let winner = null;
Copy link

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);
Copy link

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);
Copy link

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} />
Copy link

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}

@tgoslee
Copy link

tgoslee commented Jan 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants