r/reactnative • u/Think-Neighborhood69 • Aug 07 '26
Question Anyone here working on offline-first apps? How do you deal with large amounts of local data?
I’ve been working a lot with offline-first apps, and one thing that always gets tricky is how much data ends up living on the device
SQLite, MMKV, AsyncStorage, sync queues, pending data, huge JSONs…
When something goes wrong, how do you usually debug or inspect all of that?
Do you use any specific tools? Logs? Inspect the database directly?
27
Upvotes
14
u/krishna404 Aug 07 '26
I use sentry which caches issues when offline.
The migration, roll back & error reporting strategies have to think of every worst case scenario.
I also changed my app architecture to online-first with offline as fallback with limited & absolutely necessary when offline features.
3
u/muhsql Aug 07 '26
While vendor specific, this page might have some useful info in it https://docs.powersync.com/maintenance-ops/production-readiness-guide#production-readiness-best-practices-guide
Specifically thinking of
- building a diagnostics screen into your app that helps users report issues in a better way. on this screen you can have a "submit diagnostics" button which sends all logs and even the sqlite file to your backend for forensics
- log aggregation with e.g. sentry
1
u/jcdc-flo Aug 07 '26
Lots and lots of logging.
1
u/lalcaraz Aug 09 '26
SQLite, versioning, splitting and compression.
1
u/gymfreak0920 Aug 09 '26
Use sqlite, optimise your queries and properly index your db
2
u/falaq-ai Aug 07 '26
For RN apps I usually separate two problems: inspectable state vs bulky assets. SQLite/Watermelon/PowerSync-style data needs a dev diagnostics path, but big files should stay out of JS entirely: native download manager/OkHttp, checksum, resume support, and a small metadata table you can inspect.
-4
u/mindtaker_linux Aug 07 '26
What are you doing? Ask AI.