[1팀 정원호] Chapter 2-3. 관심사 분리와 폴더구조#63
Open
Jeong-wonho wants to merge 33 commits intohanghae-plus:mainfrom
Open
[1팀 정원호] Chapter 2-3. 관심사 분리와 폴더구조#63Jeong-wonho wants to merge 33 commits intohanghae-plus:mainfrom
Jeong-wonho wants to merge 33 commits intohanghae-plus:mainfrom
Conversation
ywkim95
reviewed
May 15, 2025
ywkim95
left a comment
There was a problem hiding this comment.
원호님 고생 많으셨어요!
항상 주석을 남겨서 구분을 지으시는 습관은 정말 좋네요 ㅎㅎ
대부분의 코드를 잘 분리해주셔서 읽기도 좋았습니다!
과제 고생하셨습니다~~!
Comment on lines
+53
to
+70
| if (newComment === null) { | ||
| return { | ||
| newComment: { | ||
| ...state.newComment, | ||
| body: "", | ||
| postId: null, | ||
| }, | ||
| } | ||
| } | ||
| if (typeof newComment === "number") { | ||
| return { | ||
| newComment: { | ||
| ...state.newComment, | ||
| postId: newComment, | ||
| }, | ||
| } | ||
| } | ||
| return { newComment } |
There was a problem hiding this comment.
이러한 복잡한 부분은 함수로 분리하시면 가독성이 더 올라가지 않을까 생각이 듭니다!
Comment on lines
+7
to
+14
| filtered: (params: { | ||
| skip: number; | ||
| limit: number; | ||
| tag?: string; | ||
| sortBy?: string; | ||
| sortOrder?: string; | ||
| searchQuery?: string; | ||
| }) => [...postKeys.all, 'filtered', params] as const, |
There was a problem hiding this comment.
타입을 따로 분리하셨으면 가독성이 더 올라갔을 듯 해요! 추가적으로 Pick 또는 Omit 등을 사용해서 기존 타입(또는 인터페이스)를 재활용하셨어도 좋았을 듯합니다!
| interface PostStore { | ||
| posts: Post[] | ||
| selectedPost: Post | null | ||
| total: number |
There was a problem hiding this comment.
해당 파일은 훅을 분리하셔서 진행하셨으면 가독성이 더 올라가서 읽기가 더 쉬웠을 거라고 생각이 들어요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
과제 체크포인트
https://jeong-wonho.github.io/front_5th_chapter2-3/?limit=10&sortOrder=asc
기본과제
목표 : 전역상태관리를 이용한 적절한 분리와 계층에 대한 이해를 통한 FSD 폴더 구조 적용하기
체크포인트
심화과제
목표: 서버상태관리 도구인 TanstackQuery를 이용하여 비동기코드를 선언적인 함수형 프로그래밍으로 작성하기
체크포인트
과제 셀프회고
과제에서 좋았던 부분
fsd와 전역상태관리 zoostand와 TanStack Query에 대해서 배울 수 있어서 좋았습니다. 그리고 그만큼 힘들었던 거 같아요.
과제를 하면서 새롭게 알게된 점
과제를 진행하면서 아직 애매하게 잘 모르겠다 하는 점, 혹은 뭔가 잘 안되서 아쉬운 것들
리뷰 받고 싶은 내용이나 궁금한 것에 대한 질문
이런건 그래도 쉽다 생각했습니다.
두번째꺼는 위치를 Post에둘지 post-table에 둘지 고민이었습니다.!