Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://task-5-git-fork-alexust27-master.itmo-yandex.now.sh |
| export class SearchInput extends React.Component { | ||
| render() { | ||
| return ( | ||
| <form method="post" className="header__search"> |
There was a problem hiding this comment.
Кажется POST сейчас приложением не обрабатывается
| id={action.act} | ||
| className="main-block__ref-func" | ||
| onClick={() => { | ||
| if (action.act === 'get-letter' && !this.props.isLetterOpened) |
There was a problem hiding this comment.
Поставить несколько кнопок с разными обработчиками и код бы стал сразу немного проще
| onCheckboxChange(id) { | ||
| const newCheckedLetters = this.state.checkedLetters; | ||
| this.setState(() => { | ||
| newCheckedLetters[id] = !newCheckedLetters[id]; |
There was a problem hiding this comment.
Создание нового куска стейта нужно делать без модификации предыдущего
|
|
||
| newMail() { | ||
| counter++; | ||
| const id = counter; |
There was a problem hiding this comment.
Генератор письма со всеми параметрами можно вынести в отдельный модуль и сущность для лучшей читаемости
There was a problem hiding this comment.
Вынес функцию генерации письма в generator.js
|
@underoot я поправил, посмотри, пожалуйста |
No description provided.