메인페이지 TanStack Query 적용 및 리팩토링 #116
Merged
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.
#️⃣연관된 이슈
📝작업 내용
category,sort,keyword가 바뀔 때마다 SSRcategory,sort,keyword가 바뀔 때마다 캐싱 기반 CSR게시글 목록 무한 스크롤
useInfiniteScroll-> React QueryuseInfiniteQuery페이지 전환 시 이전 페이지의
keyword값이 유지되어, 전환된 페이지에서 동일 검색어로 재검색이 불가능keyword를 전역적으로 초기화하기 위해useResetKeywordOnPathChange훅 추가ClientLayout생성 및 적용스크린샷 (선택)
💬리뷰 요구사항(선택)
Header컴포넌트에 검색바가 있어 메인페이지와keyword및category상태 공유가 필요하기 때문에 Zustand 사용