-
Notifications
You must be signed in to change notification settings - Fork 24
Яковлев Илья, М3339 #15
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
base: master
Are you sure you want to change the base?
Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://task-5-git-fork-okayvlev-master.itmo-yandex.now.sh |
src/app/main/mailbox/data.ts
Outdated
|
|
||
| export const PRELOADED_MAILS = [ | ||
| new Mail( | ||
| 'images/owl-face.jpg', |
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.
При таком подводе может быть очень неудобно поддерживать код. Лучше передавать в функцию объект с соответствующими именованными полями
types/react.d.ts
Outdated
| @@ -0,0 +1,50 @@ | |||
| export namespace Children { | |||
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.
Чтобы не делать так, и соответственно не ломать всю типизацию, нужно установить @types/react
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.
Я так понял ты просто переопределился чтобы не было проблем с типизацией в реакте, но это по сути отключение типизации. Так не пойдёт
|
|
src/app/main/mailbox/mailbox.tsx
Outdated
| mails: Array<Mail>; | ||
| } | ||
|
|
||
| export class MailBox extends Component<any, MailBoxState> { |
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.
Какой смысл везде использовать any? Приложения на TypeScript не используют или почти не используют any т.к. это отключает всю проверку и теряет смысл
rmbaad
left a comment
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.
Вижу только 1 задание, инпут для поиска вообще не является инпутом
src/app/main/mailbox/mail/mail.tsx
Outdated
| onAnimationEnd: () => void; | ||
| } | ||
|
|
||
| export class Mail extends Component<MailProps, any> { |
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.
Если нет стейта, то второй параметр для Component просто можно не указывать
No description provided.