Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

tic-toe #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

tic-toe #1

wants to merge 2 commits into from

Conversation

OlgaTitarenko
Copy link
Owner

No description provided.

Copy link

@ivadimko ivadimko left a comment

Choose a reason for hiding this comment

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

В целом хорошо
Оставил комментарии, что можно было бы улучшить

src/App.js Outdated
}

handleClick(i) {
const square = this.state.squares.slice();

Choose a reason for hiding this comment

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

slice же только для копирования массива?
более обыденным выглядело бы

const square = [...this.state.squares]

{' '}
</div>

<div className="board-row">

Choose a reason for hiding this comment

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

было бы хорошо автоматизировать рендер ячеек
можно сделать позиционирование стилями и избавиться от промежуточных board-row

this.state.squares.map((square, i) => this.renderSquare(i, winLine))

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

Successfully merging this pull request may close these issues.

2 participants