✨ [Feat] tanstack-query 및 쿼리키 설정 변경#274
Merged
Conversation
1 task
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
sunnwave
approved these changes
Jan 3, 2025
haegu97
approved these changes
Jan 3, 2025
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.
#️⃣연관된 이슈
📝작업 내용
쿼리키 팩토리 구조를 변경했습니다.
아직 이러한 방식이 맞는지 확신은 없는 상태라 주말에 멘토님께 한 번 더 여쭤봐야할 것 같습니다 ㅠㅠ
우선 어느정도 관련된 키들은 내부에 또 구조화를 해두어서 하나씩
invalidQuries를 선언하지 않고 한 번에 처리할 수 있도록 해두었습니다.또한 지금 api가 단순히
bookclubs내부의API.ts파일에서 선언되어 있는 부분들이 있고,react-query폴더의quries파일에 선언되어 있던 부분들이 있어서 단순히 api를 선언하는 부분은 API 파일에 두고quries에서는 해당 api를 통한 tanstack-query 로직에만 관심을 두도록 변경했습니다.기타 참고사항
강사님의 말씀대로 우선 로그인시 tanstack-query 캐시를 전부 무효화하도록 해두었는데, 로그아웃시 하는게 자연스러울 것 같다는 생각이 들긴하네여. 로그아웃시에 무효화했을시 제대로 동작을 안했던 이슈가 있어서 발표 이후 한 번 얘기 나눠보면 좋을 것 같습니다!