fix: 새로고침 시 로딩 스피너가 무한으로 도는 문제 수정 - #206
Merged
Merged
Conversation
onlineManager.setOnline 판단에 isInternetReachable을 함께 걸고 있었는데, 이 값은 reachability 확인 전 null을 자주 반환해 실제로는 연결돼 있어도 오프라인으로 오판되곤 했음. 이 경우 React Query가 진행 중인 fetch를 paused 상태로 멈춰 isRefetching이 계속 true로 남아 커뮤니티 등 화면의 pull-to-refresh 스피너가 사라지지 않았음. isConnected만으로 판단하도록 수정.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
확인했습니다 머지해주세요! |
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.
Summary
hooks/use-online-manager.ts에서onlineManager.setOnline()판단에isInternetReachable을 함께 걸고 있었는데, 이 값은 NetInfo가 reachability 확인을 마치기 전(특히 와이파이 연결 직후)null을 자주 반환함.Boolean(null)은false라서 실제로는 인터넷이 정상인데도 앱 전체가 "오프라인"으로 오판됨networkMode: 'online', 기본값)가 진행 중이던 fetch를 paused 상태로 멈추고,isFetching/isRefetching이 계속true로 남아 스피너가 멈추지 않음 — NetInfo가 다시isInternetReachable: true이벤트를 보내주지 않으면 영영 안 풀림Changes
hooks/use-online-manager.ts:onlineManager.setOnline()판단을isConnected만 사용하도록 변경 (TanStack Query 공식 React Native 가이드 권장 방식,isInternetReachable은 신뢰도가 낮아 제외)Test plan