React Native

Offline-First Architecture

NetInfo, sync strategies, conflict resolution, queue management, offline UX

20 คำถามสัมภาษณ์·
Senior
1

What is offline-first architecture in the context of a mobile application?

คำตอบ

Offline-first architecture is a design approach where the application is built to work primarily with local data, with server synchronization being secondary. Data is stored locally first and synced with the backend when connectivity is available. This approach ensures a smooth user experience even without network connection, unlike the online-first approach that depends on connectivity to function.

2

Which package should be used to detect network connection state in React Native?

คำตอบ

@react-native-community/netinfo is the standard package for detecting network connection state in React Native. It provides information about whether the device is connected, the connection type (WiFi, cellular), and offers listeners to react to connectivity changes in real-time. It's an essential component for implementing offline-first architecture.

3

How to use NetInfo to listen for connectivity changes in real-time?

คำตอบ

NetInfo.addEventListener allows subscribing to connectivity changes and returns an unsubscribe function. This function should be called in useEffect cleanup to prevent memory leaks. The callback receives a state object containing isConnected, type, and other information about the current connection. This approach is essential for dynamically reacting to network changes.

4

What is the difference between isConnected and isInternetReachable in NetInfo?

5

Which synchronization strategy to use for an offline-first note-taking application?

+17 คำถามสัมภาษณ์

หัวข้อสัมภาษณ์ React Native อื่นๆ

JavaScript Essentials

Junior
25 คำถาม

React Fundamentals

Junior
20 คำถาม

React Native Basics

Junior
22 คำถาม

React Hooks

Junior
20 คำถาม

TypeScript for React & React Native

Junior
22 คำถาม

React Native Components & API

Junior
20 คำถาม

React Native Styling & Layout

Junior
18 คำถาม

React Native Navigation

Mid-Level
22 คำถาม

React Native State Management

Mid-Level
24 คำถาม

React Native Networking & API

Mid-Level
20 คำถาม

Data Persistence

Mid-Level
20 คำถาม

Forms & Validation

Mid-Level
18 คำถาม

React Native Animations

Mid-Level
22 คำถาม

Native Modules & Bridge

Mid-Level
20 คำถาม

Platform-Specific Code

Mid-Level
18 คำถาม

Permissions & Device APIs

Mid-Level
20 คำถาม

Push Notifications

Mid-Level
18 คำถาม

React Native Testing

Mid-Level
20 คำถาม

React Native Debugging

Mid-Level
18 คำถาม

Build & Deployment

Mid-Level
20 คำถาม

Expo vs React Native Bare

Mid-Level
18 คำถาม

Performance Optimization

Senior
24 คำถาม

Memory Management

Senior
20 คำถาม

Architecture Patterns

Senior
22 คำถาม

React Native New Architecture

Senior
24 คำถาม

Security Best Practices

Senior
20 คำถาม

React Native CI/CD

Senior
20 คำถาม

Monorepo & Code Sharing

Senior
18 คำถาม

Advanced Topics

Senior
22 คำถาม

App Lifecycle & Background Execution

Mid-Level
20 คำถาม

Authentication & Session Management

Mid-Level
22 คำถาม

Monitoring & Crash Reporting

Senior
20 คำถาม

เชี่ยวชาญ React Native สำหรับการสัมภาษณ์ครั้งถัดไป

เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์

เริ่มใช้ฟรี