We're building a React Native app for field teams that often work with unreliable internet.
Users need to continue working offline and sync changes when they reconnect. Our main concern is conflicting updates—for example, two users modifying the same customer record while one is offline.
Our stack is:
React Native
Node.js
REST API
PostgreSQL
We're considering last-write-wins, record versioning, optimistic concurrency, or an operation queue.
What is the recommended production approach for handling offline synchronization and conflict resolution without losing user changes?