-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor(toks-main): server component 역할 분리와 메인 Skeleton UI 추가 #390
Conversation
@chaaerim 드래프트 풀면 자동머지되서 막아놨어요 cicd 수정되면 그때 풀겠습니다 |
@minsgy 브랜치 규칙 release에도 적용해뒀습니다~! |
b9cc44c
to
a421d63
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## release/routing #390 +/- ##
==================================================
- Coverage 0.08% 0.08% -0.01%
==================================================
Files 164 171 +7
Lines 5934 6166 +232
Branches 164 171 +7
==================================================
Hits 5 5
- Misses 5929 6161 +232 ☔ View full report in Codecov by Sentry. |
<Suspense fallback={<SkeletonCardList />}> | ||
<CardList /> | ||
</Suspense> |
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만 둘러싸면 되는걸까요?
아니면 useQuery를 통해 호출할때 변경해야 하는 부분이 있을까요?
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.
useSuspenseQuery를 써주시면 될 것 같습니다~! 그거말곤 없어요
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.
useSuspenseQuery
를 써야하는 경우가 어떤 상황일까요?? react suspense같은 경우는 ui상의 로딩처리가 필요할 때 쓰는게 맞죠..??
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.
말씀하신거처럼 UI상 로딩처리가 필요할 때 사용 할 수있는 케이스가 맞고,
prefetch 제외하고 streaming으로 UI를 나누어서 보여줘야하는 상황이 맞을 것 같아요! @chaaerim
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.
참고로.. 로딩처리는 3가지로 나뉘어서 볼 수 있을것 같습니당
- page.tsx -> loading.tsx
- server suspense -> fallback
- react-query -> isPending
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.
이 파일에서 export해주고 있는 함수들은 우선 만들어두기만 하신건가요?
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.
요거 슬랙에 올렸었는데 쓸까하다가 queryKey, queryFn 전부 분리해서 쓰더라고요..? 근데그렇게까진 오버스펙같아서 안쓰긴했습니다 https://soobing.github.io/react/next-app-router-react-query/
{children} | ||
{toast} | ||
{bottomSheet} |
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.
요거는 혹시 RootLayout에서 하는건 좀 별로일까요?
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.
bottomSheet는 쓰이는 페이지마다 관리해주는게 좋아보이고 toast는 쓰이는 곳 추가로 생기면 써도 좋을 것 같네요~
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 fallback={<SkeletonCardList />}> | ||
<CardList /> | ||
</Suspense> |
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.
useSuspenseQuery
를 써야하는 경우가 어떤 상황일까요?? react suspense같은 경우는 ui상의 로딩처리가 필요할 때 쓰는게 맞죠..??
export const Skeleton = ({ className }: Props) => { | ||
return ( | ||
<div | ||
className={twMerge('h-[20px] w-full rounded-[8px] bg-gray-90', className)} |
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.
clsx 말고 twMerge 사용하신 이유가 있나요!?!?!?
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.
@chaaerim 요거 height/width 값 수정해야하는데 clsx를 사용하면 css가 오버라이딩되서 적용이 안됩니당
💡 왜 PR을 올렸나요?
💁 무엇이 어떻게 바뀌나요?
Skeleton UI 추가
![image](https://private-user-images.githubusercontent.com/60251579/296526671-b0743c66-1d6a-4e34-9b96-c8c871a0816b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzAwMDgsIm5iZiI6MTczOTY2OTcwOCwicGF0aCI6Ii82MDI1MTU3OS8yOTY1MjY2NzEtYjA3NDNjNjYtMWQ2YS00ZTM0LTliOTYtYzhjODcxYTA4MTZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAxMzUwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE3MDFmMmFkZDUxODI0MzRmOWEyMjRlZmE2YmE0YTZjZGI4NGI3MjEyY2IyMzNjYjU3YTU4MjJjYzkxYTAzYWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1DUXTdDhk-8e_DfM15udqDDZm6jdJzlGJjmC5uQAteA)
dev tools
![image](https://private-user-images.githubusercontent.com/60251579/296526688-ff56ed2e-5f12-4f00-855b-2cc872074a10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzAwMDgsIm5iZiI6MTczOTY2OTcwOCwicGF0aCI6Ii82MDI1MTU3OS8yOTY1MjY2ODgtZmY1NmVkMmUtNWYxMi00ZjAwLTg1NWItMmNjODcyMDc0YTEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAxMzUwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyZjQwYTRkZWQzZjgxN2FkYmE5ZTc1ZmM1MThmOWU0MzQwM2RjZTQ1MjczZTBiNzk3Y2RmZTQyOTRlNDJlMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ck-apJbZ1CeR8OS7WdQMZGMXOsqgJxZ-raAlKukwt-g)
💬 리뷰어분들께