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

[공통] 데이터가 stale일때 refetch 되도록 수정 #297

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

chaeseungyun
Copy link
Contributor

@chaeseungyun chaeseungyun commented Apr 20, 2024

What is this PR? 🔍

Changes 📝

기존 queryClient 설정을 보면 refetchOnMount가 false로 지정되어 있어 쿼리 무효화를 시켜서 데이터가 stale상태가 되어도 refect가 안되는 경우가 있었습니다. 이 값을 true로 바꿔서 invalidationQueries가 원하는대로 동작하도록 수정했습니다.
또한 추가로 refetchOnWindowFocus, refetchOnReconnect도 false인 점이 불필요하다고 판단되어 true로 수정했습니다.

기존에 invalidation이 동작하지 않아서 refetchQueries 또는 useQuery의 refetch를 사용하신 부분이 많이 있을 겁니다.
자신이 수정했던 부분을 기억하셔서 불필요한 refetch가 이루어지지 않는지 다들 한번씩 확인 부탁드리겠습니다

ScreenShot 📷

image

Test CheckList ✅

Precaution

✔️ Please check if the PR fulfills these requirements

  • It's submitted to develop branch, not the main branch
  • Did you merge recent develop branch?

@chaeseungyun chaeseungyun self-assigned this Apr 20, 2024
@chaeseungyun chaeseungyun merged commit 2365a74 into develop Apr 20, 2024
2 checks passed
@chaeseungyun chaeseungyun deleted the fix/#296/modify-queryClient branch April 20, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[공통] queryClient 재정의
2 participants