# Offline-First Architecture (React Native) > NetInfo, 동기화 전략, 충돌 해결, 큐 관리, 오프라인 UX - 20 면접 질문 - Senior - [면접 질문: React Native](https://sharpskill.dev/ko/technologies/react-native/interview-questions.md) ## 1. 모바일 애플리케이션 맥락에서 오프라인 우선(offline-first) 아키텍처란 무엇입니까? **답변** 오프라인 우선 아키텍처는 애플리케이션이 주로 로컬 데이터로 동작하도록 설계되고 서버 동기화는 부차적인 것으로 간주하는 설계 방식입니다. 데이터는 먼저 로컬에 저장되고 연결이 가능할 때 백엔드와 동기화됩니다. 이 방식은 동작하기 위해 연결에 의존하는 온라인 우선 방식과 달리 네트워크 연결이 없어도 매끄러운 사용자 경험을 보장합니다. ## 2. React Native에서 네트워크 연결 상태를 감지하려면 어떤 패키지를 사용해야 합니까? **답변** @react-native-community/netinfo는 React Native에서 네트워크 연결 상태를 감지하기 위한 표준 패키지입니다. 기기가 연결되어 있는지 여부, 연결 유형(WiFi, 셀룰러)에 대한 정보를 제공하며, 연결 상태 변화에 실시간으로 반응하는 리스너를 제공합니다. 오프라인 우선 아키텍처를 구현하는 데 필수적인 구성 요소입니다. ## 3. 실시간으로 연결 상태 변화를 수신하려면 NetInfo를 어떻게 사용하나요? **답변** NetInfo.addEventListener를 사용하면 연결 상태 변화를 구독할 수 있으며, 구독 해제 함수를 반환합니다. 이 함수는 메모리 누수를 방지하기 위해 useEffect의 cleanup에서 호출해야 합니다. callback은 isConnected, type 및 현재 연결에 대한 기타 정보를 포함하는 state 객체를 받습니다. 이 방식은 네트워크 변화에 동적으로 반응하기 위해 필수적입니다. ## 17개 추가 질문 이용 가능 - NetInfo에서 isConnected와 isInternetReachable의 차이점은 무엇인가요? - 오프라인 우선 메모 작성 앱에는 어떤 동기화 전략을 사용해야 합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 React Native 면접 주제 - [JavaScript 핵심](https://sharpskill.dev/ko/technologies/react-native/interview-questions/javascript-essentials.md): 25개 질문, Junior - [React 기초](https://sharpskill.dev/ko/technologies/react-native/interview-questions/react-fundamentals.md): 20개 질문, Junior - [React Native 기초](https://sharpskill.dev/ko/technologies/react-native/interview-questions/react-native-basics.md): 22개 질문, Junior - [React Hooks](https://sharpskill.dev/ko/technologies/react-native/interview-questions/react-hooks.md): 20개 질문, Junior - [React 및 React Native를 위한 TypeScript](https://sharpskill.dev/ko/technologies/react-native/interview-questions/typescript-for-react-native.md): 22개 질문, Junior - [React Native 컴포넌트 및 API](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-components-api.md): 20개 질문, Junior - [React Native 스타일링 및 레이아웃](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-styling-layout.md): 18개 질문, Junior - [React Native 내비게이션](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-navigation.md): 22개 질문, Mid-Level - [React Native 상태 관리](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-state-management.md): 24개 질문, Mid-Level - [React Native 네트워킹 및 API](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-networking-api.md): 20개 질문, Mid-Level - [데이터 영속성](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-data-persistence.md): 20개 질문, Mid-Level - [폼과 유효성 검사](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-forms-validation.md): 18개 질문, Mid-Level - [React Native 애니메이션](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-animations.md): 22개 질문, Mid-Level - [Native Modules & Bridge](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-native-modules.md): 20개 질문, Mid-Level - [플랫폼별 코드](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-platform-specific-code.md): 18개 질문, Mid-Level - [권한 및 디바이스 API](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-permissions-apis.md): 20개 질문, Mid-Level - [Push Notifications](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-push-notifications.md): 18개 질문, Mid-Level - [React Native 테스팅](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-testing.md): 20개 질문, Mid-Level - [React Native 디버깅](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-debugging.md): 18개 질문, Mid-Level - [Build & Deployment](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-build-deployment.md): 20개 질문, Mid-Level - [Expo vs React Native Bare](https://sharpskill.dev/ko/technologies/react-native/interview-questions/expo-vs-bare-rn.md): 18개 질문, Mid-Level - [성능 최적화](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-performance-optimization.md): 24개 질문, Senior - [메모리 관리](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-memory-management.md): 20개 질문, Senior - [Architecture Patterns](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-architecture-patterns.md): 22개 질문, Senior - [React Native New Architecture](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-new-architecture.md): 24개 질문, Senior - [보안 모범 사례](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-security-best-practices.md): 20개 질문, Senior - [React Native CI/CD](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-ci-cd.md): 20개 질문, Senior - [Monorepo와 코드 공유](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-monorepo-architecture.md): 18개 질문, Senior - [고급 주제](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-advanced-topics.md): 22개 질문, Senior - [앱 라이프사이클 및 백그라운드 실행](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-app-lifecycle-background.md): 20개 질문, Mid-Level - [인증 및 세션 관리](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-auth-session-management.md): 22개 질문, Mid-Level - [Monitoring & Crash Reporting](https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-monitoring-crash-reporting.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/react-native/interview-questions/rn-offline-first