-
Notifications
You must be signed in to change notification settings - Fork 40
[오병훈] Sprint8 #257
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
[오병훈] Sprint8 #257
The head ref may contain hidden characters: "React-\uC624\uBCD1\uD6C8-sprint8"
Conversation
|
수고 하셨습니다 ! 스프리트 미션 하시느라 정말 수고 많으셨어요. |
|
|
||
| function AllItemsSection() { | ||
| const [orderBy, setOrderBy] = useState('recent'); | ||
| const [orderBy, setOrderBy] = useState<ProductOrderBy>('recent'); |
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.
크으 굳굳 ! 타입을 확인해보니 "recent" | "favorite"군요 !
명확한 타입입니다 ! 굳굳 ~! 👍
|
|
||
| function BestItemSection() { | ||
| const [itemList, setItemList] = useState([]); | ||
| const [itemList, setItemList] = useState<Product[]>([]); |
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.
굳굳 ! 여러 곳에서 사용될 타입을 정의함으로서 재사용성을 높였군요 ! 👍👍
| interface FileInputProps { | ||
| name: string; | ||
| value: File | null; | ||
| initialPreview: string | null; | ||
| onChange: (name: string, value: File | null) => void; | ||
| } |
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 handleChange = (e) => { | ||
| const nextValue = e.target.files[0]; | ||
| const handleChange = (e: ChangeEvent<HTMLInputElement>) => { |
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.
함수 이벤트 타입도 명확하구요 !
| function FileInput({ name, value, initialPreview, onChange }: FileInputProps) { | ||
| const [preview, setPreview] = useState(initialPreview); | ||
| const inputRef = useRef(); | ||
| const inputRef = useRef<HTMLInputElement | null>(null); |
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.
ref 타입도 명확하네요 ㅠㅠ
|
어우.. 병훈님 이번 코드. 제 눈에는 딱히 흠 잡을데가 보이지 않는군요 ㄷㄷ 금방 적응하시고 아마 빠르게 멋진 개발자가 되실거라 생각됩니다 ㅎㅎ 😊😊 그 간 함께해주셔서 감사했습니다 ! 앞으로도 개발자 꽃길 되시길 기원드립니다 ! 😊 |
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게