-
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 #373
[이현승] week12 #373
Conversation
} | ||
`; | ||
|
||
const AddLink = ({ folder, footView }: { folder: any; footView: boolean }) => { |
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대신 타입을 지정해주는 것이 어떨까요?
} | ||
`; | ||
|
||
const AddLink = ({ folder, footView }: { folder: any; footView: boolean }) => { |
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.
이런 방식으로 작성하면 가독성이 더 좋을 것 같습니다
const AddLink = ({ folder, footView }: { folder: any; footView: boolean }) => { | |
interface AddLinkPrpos { | |
folder: any; | |
footView: boolean; | |
} | |
const AddLink = ({ folder, footView }: AddLinkProps) => { |
}; | ||
|
||
const handleSearch = (e: ChangeEvent<HTMLInputElement>) => { | ||
if (search?.current?.value !== "") { |
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://ahnheejong.gitbook.io/ts-for-jsdev/06-type-system-deepdive/type-narrowing
|
||
interface Props { | ||
selectFolder: (e: MouseEvent<any, MouseEvent>) => void; | ||
folderInfo: 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.
any사용은 지양해주세요!
파트2 진행하시느라 고생 많으셨습니다 현승님! 멘토링 때 참여도 가장 활발히 해주시고, 코드도 너무 잘 작성해주시는 모습 보여주셔서 좋았습니다. |
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게