-
Notifications
You must be signed in to change notification settings - Fork 21
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
[김주동] sprint11 #131
The head ref may contain hidden characters: "Next-\uAE40\uC8FC\uB3D9-sprint11"
[김주동] sprint11 #131
Conversation
React 김주동 sprint6
* First commit Sprint Mission5 on React * Sprint mission 6 commit. * Sprint Mission 6 Update 1 * update sprint mission 6 * Sprint mission 6 update commit. * delete .bak files * Update Comments * modify ItemComment
…print-Mission into Next-김주동-sprint9
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.
주동님 이번 스프린트 미션 고생하셨습니다~
불필요한 주석이 많아서 다음에는 정리후 PR 올려주시면 더 좋을 것 같아요!
시간이 되시면 리팩토링을 통해 코드정리를 해보시면 더 좋을 것 같습니다~
headers: { | ||
"Content-Type": "application/json", | ||
}, |
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.
P3:
header content-type 에 대한 mdn 문서입니다~
전송되는 데이터 타입에 대해 명시해주는 값입니다.
https://developer.mozilla.org/ko/docs/Web/HTTP/Headers/Content-Type
@@ -17,6 +17,7 @@ | |||
"react": "^18", | |||
"react-dom": "^18", | |||
"react-hook-form": "^7.53.1", | |||
"react-router-dom": "^6.28.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.
P3:
next가 깔려있으니 next를 사용하시면 더 좋겠습니다~
id: string; | ||
label: string; | ||
placeholder: string; | ||
register: UseFormRegisterReturn; // react-hook-form의 register 함수 사용 |
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.
P2:
register이라는 명은 꼭.. react-hook-form의 register 함수 자체를 의미하는 것 같습니다.
더 적절한 이름이면 좋을 것 같아요.
register, | ||
errorMessage, | ||
}) => { | ||
const [showPassword, setShowPassword] = useState(false); |
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.
P3:
boolean 값에서 이름은 isShowPassword
가 더 일반적일 것 같습니다~
formState: { errors, isValid }, | ||
} = useForm<LoginFormValues>({ mode: "onChange" }); | ||
|
||
const onSubmit: SubmitHandler<LoginFormValues> = async (data) => { |
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.
P2:
data 자체로 사용하지 않으니 아래처럼 분해해서 쓰시는게 더 좋을 것 같습니다.
const onSubmit: SubmitHandler<LoginFormValues> = async (data) => { | |
const onSubmit: SubmitHandler<LoginFormValues> = async ({ email, password }) => { |
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게