Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧩 이슈 번호
✅ 작업 사항
👩💻 공유 포인트 및 논의 사항
기존
현재
기존에 watch 로 값의 변화를 감지하고 있다 보니, FormProvider 로 감싸진 전체 영역이 리렌더링되는 현상이 발생했었는데요,
여기에 useWatch를 사용하는 방식으로 수정하여 값을 구독하는 컴포넌트만 리렌더링되도록 했어요.
추가로, 페이지 내에 존재하는 컴포넌트를 분리하기에는 애매하지만 값이 변경되었을 때 전체가 리렌더링 되는 것이 아니라 특정 JSX만 리렌더링하고 싶은 경우에는 Controller를 사용했어요.
(ex. TimePicker)
Reference: https://github.com/orgs/react-hook-form/discussions/7558