Skip to content
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

feat: tanstack-query 적용 #114

Merged
merged 15 commits into from
Aug 5, 2023
Merged

feat: tanstack-query 적용 #114

merged 15 commits into from
Aug 5, 2023

Conversation

corinthionia
Copy link
Member

@corinthionia corinthionia commented Aug 2, 2023

🔗 연관된 이슈 번호

resolve #113

✨ 어떤 기능을 개발했나요?

이전에 쓰기로 했던 tanstack-query (구 react-query)를 적용했습니다

✅ 어떻게 해결했나요?

/constants/QUERY_KEYS.ts query key들을 constant로 저장합니다
/api query function - api 호출 함수들을 저장합니다
/queries 커스텀 훅을 제작하여 useQuery 혹은 useMutation을 리턴합니다

📌 어떤 부분에 집중하여 리뷰해야 할까요?

api 호출하는 모든 부분을 바꿔 놓았는데 이해 안 가시는 부분 있으면 말씀해 주세요

Copy link
Collaborator

@YesHyeon YesHyeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정말 고생하셨습니다!
저도 덕분에 공부 많이 됐습니다 최고!

src/pages/roomTimer/RoomTimer.tsx Outdated Show resolved Hide resolved
src/queries/availableTimes/useGetAvailableTimesByOne.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 좋은 것 같습니다 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

객체로 queryKey 관리하는 걸 권장한다고 하는데 좋은 것 같습니다!

src/components/addTimeTable/AddTimeTable.tsx Outdated Show resolved Hide resolved
src/pages/login/Login.tsx Show resolved Hide resolved
src/pages/roomTimer/RoomTimer.tsx Outdated Show resolved Hide resolved
src/queries/availableTimes/useGetAvailableTimesByOne.ts Outdated Show resolved Hide resolved
src/queries/availableTimes/useGetAvailableTimesByGroup.ts Outdated Show resolved Hide resolved
src/queries/result/useGetCandidateTimes.ts Outdated Show resolved Hide resolved
src/queries/room/useGetRoomInfo.ts Outdated Show resolved Hide resolved
@corinthionia corinthionia merged commit 73881b6 into develop Aug 5, 2023
2 checks passed
@corinthionia corinthionia deleted the refactor/api branch August 7, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: tanstack-query 도입
2 participants