-
Notifications
You must be signed in to change notification settings - Fork 41
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
회원가입 로직 기능을 추가합니다. #139
회원가입 로직 기능을 추가합니다. #139
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.
LGTM
import type { SubmitHandler } from "react-hook-form"; | ||
import { useForm } from "react-hook-form"; |
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 type { SubmitHandler } from "react-hook-form"; | |
import { useForm } from "react-hook-form"; | |
import { useForm, type SubmitHandler } from "react-hook-form"; |
요렇게 하는것도 좋을 것 같아요! 일부러 분리시킨 걸까요?
<fieldset className="form-group"> | ||
<input | ||
{...register("username", { required: "Username can't be blank" })} | ||
className="form-control form-control-lg" | ||
placeholder="Username" | ||
type="text" | ||
/> | ||
</fieldset> | ||
{errors.username ? <ErrorMessage message={errors.username.message} /> : 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.
react-hook-form 다룰 때 필연적으로 JSX 부분이 길어지게 되는데 하나의 훅으로 분리하는 것도 좋더라구요.
이런 케이스는 보통 어떻게 처리하시나요? 🤗
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.
react-hook-form의 validation쪽은 zod와 엮어서 다뤄봐도 좋을 것 같아요~
react-hook-form resolvers
📌 이슈 링크
📖 작업 배경
🛠️ 구현 내용
💡 참고사항
🖼️ 스크린샷
Screen.Recording.2023-09-20.at.11.29.01.PM.mov