Skip to content

Adah's #72

Open
Aghaile wants to merge 6 commits intoAda-C16:mainfrom
Aghaile:digital-starter
Open

Adah's #72
Aghaile wants to merge 6 commits intoAda-C16:mainfrom
Aghaile:digital-starter

Conversation

@Aghaile
Copy link
Copy Markdown

@Aghaile Aghaile commented Jan 4, 2022

No description provided.

Comment thread src/App.js
Comment on lines +35 to +36
// let currentPlayer = player_1;
// let winner = null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused code

Comment thread src/App.js
let resetBoard = generateSquares();
setCurrentPlayer(player1);
setWinner(null);
setSquares(resetBoard);
Copy link
Copy Markdown

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())

Comment thread src/App.js
};

const onClickCallback = (id) => {
console.log('onclick', id);
Copy link
Copy Markdown

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

Comment thread src/App.js
</header>
<main>
<Board squares={squares} />
<Board onClickCallback={boardCallback} squares={squares} />
Copy link
Copy Markdown

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
Copy Markdown

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