-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(memo): 메모 API 구현 #25
Conversation
useEffect(() => { | ||
adjustTextareaHeight(); | ||
|
||
if (prevMemo.current !== memo) { | ||
putMemo({ memoId, content: memo }); | ||
} | ||
}, [memo]); |
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를 활용해, 이전값과 memo가 달라지는 경우에만 API를 호출하도록 했습니다.
<AsyncBoundaryWithQuery> | ||
<MemosFetcher cardId={cardId}> | ||
<MemoContainer /> | ||
</MemosFetcher> | ||
</AsyncBoundaryWithQuery> |
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.
부분적으로 Suspense를 사용해 UX를 향상하고자 했습니다
loading fallback이나 error fallback은 추후 작성할 예정입니다.
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.
바로 memoContainer를 사용하는 것이 아닌 Fetcher를 이용해서 context로 내려주는 이유가 궁금해요!
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.
선언적으로 데이터 페칭을 하기 위함입니다 !
context를 사용해서 props drilling 또한 해결할 수 있어요 !
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.
좋습니다!!
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.
혹시 #24 이 브랜치에서 분기된 브랜치라면 머지 대상 브랜치를 위 브랜치로 바꿔주시면 API 부분만 바로 확인할 수 있을 것 같아요 !!
다른 이유가 있어서 main을 대상 브랜치로 두신거라면 무시하셔도 됩니다!!
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.
짱이심니다!!
1. 무슨 이유로 코드를 변경했나요?
2. 어떤 위험이나 장애를 발견했나요?
3. 관련 스크린샷을 첨부해주세요.
4. 완료 사항
5. 추가 사항 / 코드 리뷰 받고 싶은 부분