-
Notifications
You must be signed in to change notification settings - Fork 46
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
[김법균] week12 #394
The head ref may contain hidden characters: "part2-\uAE40\uBC95\uADE0-week8"
[김법균] week12 #394
Conversation
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.
고생하셨습니다! 👍
정말 죄송합니다 ㅠㅠ 이번주까지 저인줄 몰랏네요. 😭
- 절대경로 정리 깔끔해서 좋았습니다. 👍
- type 명명이 대체로 직관적이어서 좋았습니다.
- Object를 좀 더 strict하게 선언해서 사용해보세요. strict하지 않은 object 타입은 any와 같습니다.
- 불필요한 타입 단언이 많습니다. 타입 추론을 최대한 활용해보세요.
- 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.
craco를 잘 사용해주고 계시는 군요 Very good 입니다. 👍
"@types/jest": "^27.5.2", | ||
"@types/node": "^16.18.96", | ||
"@types/react": "^18.3.1", | ||
"@types/react-dom": "^18.3.0", |
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.
type이나 typescript같은 것은 build된 App 결과물에 필요없는 dependency입니다.
App 구동에 관여하지 않는 dependency들은 모두 devDependency에 정리해주세요.
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.
절대 경로로 매우 깔끔해졌네요. 👍
import instagramLogo from '@assets/images/instagram_logo.svg'; | ||
import styles from './Footer.module.css'; | ||
|
||
const Footer = forwardRef<any, any>((props, ref) => { |
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.
forwardRef의 Generic type에도 type을 지정해보는게 어떨까요!
좋은 경험이 될 겁니다.
interface UserInfo { | ||
[key: string]: 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.
보통 UserInfo의 interface는 strict하게 정해져있을 거라고 생각되는데 어떻게 생각하시나요?
key가 그냥 string이면 일반 object와 다르지 않습니다.
any와도 같은 object선언은 최대한 지양해주세요.
|
||
function noop() {} | ||
|
||
const SHARE_BUTTONS_INFO: { [key: string]: ShareButtonProps } = { |
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.
타입 추론이 되는 상황에선 타입 단언은 불필요합니다. 오히려 혼란만 일으킵니다.
요구사항
배포 링크 : https://bk-part2.netlify.app
기본
심화
주요 변경사항
스크린샷
멘토에게