Skip to content

fix: 새로고침 시 로딩 스피너가 무한으로 도는 문제 수정 - #206

Merged
JioCoder merged 1 commit into
mainfrom
fix/community
Sep 1, 2026
Merged

fix: 새로고침 시 로딩 스피너가 무한으로 도는 문제 수정#206
JioCoder merged 1 commit into
mainfrom
fix/community

Conversation

@peisonger

@peisonger peisonger commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 커뮤니티 등에서 아래로 당겨서 새로고침(pull-to-refresh)하면 로딩 스피너가 사라지지 않고 계속 도는 문제 수정
  • 근본 원인: hooks/use-online-manager.ts에서 onlineManager.setOnline() 판단에 isInternetReachable을 함께 걸고 있었는데, 이 값은 NetInfo가 reachability 확인을 마치기 전(특히 와이파이 연결 직후) null을 자주 반환함. Boolean(null)false라서 실제로는 인터넷이 정상인데도 앱 전체가 "오프라인"으로 오판됨
  • 오프라인으로 판단되면 React Query(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

  • 커뮤니티 화면에서 pull-to-refresh 후 스피너가 정상적으로 사라지는지 확인

onlineManager.setOnline 판단에 isInternetReachable을 함께 걸고 있었는데,
이 값은 reachability 확인 전 null을 자주 반환해 실제로는 연결돼 있어도
오프라인으로 오판되곤 했음. 이 경우 React Query가 진행 중인 fetch를
paused 상태로 멈춰 isRefetching이 계속 true로 남아 커뮤니티 등 화면의
pull-to-refresh 스피너가 사라지지 않았음. isConnected만으로 판단하도록
수정.
@peisonger peisonger changed the title fix: 새로고침 시 로딩 스피너가 무한으로 멈추는 문제 수정 fix: 새로고침 시 로딩 스피너가 무한으로 도는 문제 수정 Aug 31, 2026
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b132d6d7-84f8-4609-99d8-360fe6b25083


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JioCoder

JioCoder commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

확인했습니다 머지해주세요!

@JioCoder
JioCoder merged commit ab03cb6 into main Sep 1, 2026
3 checks passed
@JioCoder
JioCoder deleted the fix/community branch September 1, 2026 02:17
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.

2 participants