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

Config: tanstack-query v5로 변경 #277

Merged
merged 3 commits into from
Jan 14, 2024
Merged

Config: tanstack-query v5로 변경 #277

merged 3 commits into from
Jan 14, 2024

Conversation

navyjeongs
Copy link
Member

@navyjeongs navyjeongs commented Jan 12, 2024

🤠 개요

tanstack-query v5로 변경

💫 설명

가존에 tanstack query v4를 썼는데 suspense쿼리 및 쿼리 옵션 사용 통일을 위해 v5로 변경했어요.

원래는 위의 방식도 사용 가능했는데 v5에서는 반드시 객체 방식을 사용해야해요.

따라서 기존에 위 방식으로 적용되어 있는 쿼리를 전부 변경했어요.

useQuery(key, fn, options) // v5에서 사용 불가
useQuery({ queryKey, queryFn, ...options })

또 staleTime이 gcTime으로 이름이 변경되었어요.

그리고 tanstack query dev tools을 dev dependency로 옮겼어요.

쿼리키, 함수 관리 파일은 다른 작업하면서 함께 올릴게요!

📷 스크린샷 (Optional)

@navyjeongs navyjeongs added the ⚙️ Config 환경 설정 및 라이브러리 설정 label Jan 12, 2024
@navyjeongs navyjeongs requested a review from pp449 January 12, 2024 13:20
@navyjeongs navyjeongs self-assigned this Jan 12, 2024
@navyjeongs navyjeongs linked an issue Jan 12, 2024 that may be closed by this pull request
1 task
Copy link
Member

@pp449 pp449 left a comment

Choose a reason for hiding this comment

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

✅ queryKey랑 더 명시적으로 써야하군요

@navyjeongs navyjeongs merged commit 34f3d3b into dev Jan 14, 2024
1 check passed
@navyjeongs navyjeongs deleted the Config/#275 branch January 14, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Config 환경 설정 및 라이브러리 설정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config: tanstack query v5로 업데이트
2 participants