Skip to main content
InterviewHubPRO
Section Overview
Q39

Question 39 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

78%
React Native & Expo (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Offline-First State Synchronization: WatermelonDB vs MMKV vs SQLite with background syncing.

senior LevelDatabases & SQL

In Simple Words: Mobile apps frequently operate in subways or poor cell reception:

  • MMKV (Tencent): In-memory mapped key-value store using C++ mmap. 30x faster than AsyncStorage; ideal for user preferences, auth tokens, and session flags.
  • WatermelonDB: High-performance SQLite-backed reactive database:
    • Lazy loading: loads only visible rows into memory.
    • Observable queries: UI automatically re-renders when local database rows mutate.
    • Built-in sync engine: Tracks created_at and updated_at columns to exchange compact JSON deltas with backend endpoints during network recovery.