-
Notifications
You must be signed in to change notification settings - Fork 4
[FEAT] 호스트 페이지 렌더링 최적화 #168
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
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폴더에 추가하지 않고 Form폴더 안에서 type을 지정하신 것은 여기서만 사용해서 그런걸까요? + 폴더간 물리적 거리가 멀어서 그런걸까요?
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.
api에서도 동일 타입을 사용하고 있어서 분리하는게 좋아보이네요 :)
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.
긴 내용의 style코드를 분리한 것이 좋습니다!
| <Button onClick={handleUpdate}>업데이트</Button> | ||
| </FormArea> | ||
| </Container> | ||
| <FormProvider {...methods}> |
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.
FormProvider로 useFormContext를 사용한것이 인상적입니다!!
그런데 계층이 한단계인데 context를 사용한 이유가 있을까요?
| if (currentTag) { | ||
| const currentTags = getValues('tags'); | ||
| setValue('tags', [...currentTags, currentTag]); | ||
| setValue('tag', ''); |
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.
setValue가 2개인데 의도한 것인가요?
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.
tag, tags가 있는데 tag에서 엔터를 치면 tags 배열에 들어가고 tag는 다른 인풋을 받기 위해 빈스트링으로 설정합니다.
|
react-hook-form 라이브러리를 사용하여 효율적으로 form관리를 한 것이 인상깊었습니다! |
🚀 Issue Number
📝 주요 작업
1. React Hook Form 도입
useState로 관리되던 폼 상태를 React Hook Form으로 마이그레이션FormProvider를 사용하여 폼 컨텍스트 관리 구조화2. 성능 최적화
고민과 해결 과정
as-is
to-be