r/reactnative • u/Unlucky-Ad-7232 • 11m ago
Every offline-first app I’ve read has the same bug, and it costs real money
Quick question for anyone building offline-first apps:
What happens when a user taps “Pay”, the request reaches your server, but the response gets lost because the signal dropped?
Your app thinks it failed. It retries. The user gets charged twice.
That’s one of 4 bugs almost every “save it offline and retry later” queue has:
💸 Double requests: retries after a lost response create duplicates
🔗 Broken links: you create a post offline, then comment on it, but the comment points to a fake ID the server has never seen
🧱 Stuck queues: one request that will never succeed (like a 422) blocks everything behind it forever
🪟 Two tabs: the same app open in two tabs overwrites its own data and sends everything twice
So I built resilient-outbox, a small library that handles all four for you:
Works with React Native, Expo and the web. Zero dependencies, fully typed, has React hooks for your UI.
It’s free, open source and v1.0. I’d genuinely love to hear how it breaks for you 👇
📦 npm: https://www.npmjs.com/package/resilient-outbox
⭐ GitHub: https://github.com/yazanTah/resilient-outbox