Skip to content
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

Merged
merged 13 commits into from
Aug 19, 2024
Merged

feat(memo): 메모 API 구현 #25

merged 13 commits into from
Aug 19, 2024

Conversation

Collection50
Copy link
Member

1. 무슨 이유로 코드를 변경했나요?

  • 메모의 CRUD API를 구현했습니다.

2. 어떤 위험이나 장애를 발견했나요?


3. 관련 스크린샷을 첨부해주세요.


4. 완료 사항

  • 메모의 CRUD API를 구현했습니니다.

5. 추가 사항 / 코드 리뷰 받고 싶은 부분


Comment on lines +31 to +37
useEffect(() => {
adjustTextareaHeight();

if (prevMemo.current !== memo) {
putMemo({ memoId, content: memo });
}
}, [memo]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref를 활용해, 이전값과 memo가 달라지는 경우에만 API를 호출하도록 했습니다.

Comment on lines +174 to +178
<AsyncBoundaryWithQuery>
<MemosFetcher cardId={cardId}>
<MemoContainer />
</MemosFetcher>
</AsyncBoundaryWithQuery>
Copy link
Member Author

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은 추후 작성할 예정입니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

바로 memoContainer를 사용하는 것이 아닌 Fetcher를 이용해서 context로 내려주는 이유가 궁금해요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

선언적으로 데이터 페칭을 하기 위함입니다 !
context를 사용해서 props drilling 또한 해결할 수 있어요 !

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다!!

Copy link
Member

@eunbeann eunbeann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 #24 이 브랜치에서 분기된 브랜치라면 머지 대상 브랜치를 위 브랜치로 바꿔주시면 API 부분만 바로 확인할 수 있을 것 같아요 !!

다른 이유가 있어서 main을 대상 브랜치로 두신거라면 무시하셔도 됩니다!!

@Collection50
Copy link
Member Author

@eunbeann

#24 에 종속되는 API이므로, #24 가 main에 머지되기 전에 동일한 환경에서 작성하고자 했습니다 !

Copy link
Member

@eunbeann eunbeann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

짱이심니다!!

@Collection50 Collection50 merged commit 844a7b2 into main Aug 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants