# Building an Offline-First App With React Native and Firebase

DevFeed: [Building an Offline-First App With React Native and Firebase](<https://devfeed.tech/articles/building-an-offline-first-app-with-react-native-and-firebase-95280.md>)

Original publisher: [Read original article](<https://hackernoon.com/building-an-offline-first-app-with-react-native-and-firebase?source=rss>)

Author: Yuri V

Published: 2026-10-22T08:05:18Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [React Native](<https://devfeed.tech/topics/react-native.md>), [Local-First](<https://devfeed.tech/topics/local-first.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Firestore](<https://devfeed.tech/topics/firestore.md>), [Expo](<https://devfeed.tech/topics/expo.md>), [React](<https://devfeed.tech/topics/react.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [app](<https://devfeed.tech/tags/app.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [firestore](<https://devfeed.tech/tags/firestore.md>), [firestore-security-rules](<https://devfeed.tech/tags/firestore-security-rules.md>), [merge](<https://devfeed.tech/tags/merge.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [offline](<https://devfeed.tech/tags/offline.md>), [offline-first](<https://devfeed.tech/tags/offline-first.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [queue](<https://devfeed.tech/tags/queue.md>), [react-native](<https://devfeed.tech/tags/react-native.md>), [sync-queue](<https://devfeed.tech/tags/sync-queue.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

Generator Tracker treats AsyncStorage as the source of truth, so writes and deletes work offline and the UI does not wait for the network. Each edit gets a pending status and storage-layer timestamp; sync pushes pending records and tombstones before pulling a server snapshot. This replaces a queue that could drift from stored data and silently drop repeatedly failed uploads. A pure last-write-wins merge uses client timestamps, lets local tombstones win, and applies remote deletions only to records confirmed in the same account's cloud, protecting new local records and data from other accounts. Failed writes remain pending for a later sync, and server snapshots reconcile offline deletions while cache-only snapshots do not prune records.

## Source excerpt

How an offline-first React Native app syncs with Firestore: pending state instead of a queue, tombstones for deletes and a pure last-write-wins merge.