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.
📑 이슈 번호
#321 #310
🚧 구현 내용
메인페이지에
Suspense
를 적용하였습니다.기존 메인 페이지에서는
useGetPopularLinks
로 불러와지는links
의 존재여부에 따라서 메인화면의 모든 구성요소들의 렌더링이 결정되었습니다. 즉,links
가 늦게 fetch될수록 렌더링이 지연된다는 문제점을 가지고 있었습니다.이를 개선하고자
Suspense
도입을 시도하였고, 다음과 같은 과정에 걸쳐 리팩토링 하였습니다.links
데이터가 필요한LinkItem
에 대한 코드 모듈화Suspense
적용next/dynamic
을 사용 및Suspense
제거(dynamic
은React.lazy
와Suspense
의 기능이 합쳐졌기 때문)인기링크리스트
및메인스페이스리스트
에 스켈레톤UI를 적용하였습니다.이전의 스켈레톤UI를 삭제했던 이유인 CLS 이슈를 해결하였습니다.
🚨 특이 사항
메인페이지의 렌더링 여부가
useGetPopularLinks
에 종속적이라 렌더링 지연이 생기는 것일 거라 가정하고 수정하였지만 렌더링지연은 개선되지 않았습니다.