“I loathe the over-abundance of 'Optimistic Without Feedback Pattern'. It is used as a crutch for 'I don't want to bother implementing error cases'. — yuliyp, Hacker News (https://news.ycombinator.com/item?id=41679149)”
You know that feeling when your app breaks the moment you step into a subway tunnel or a dead zone? Most expense apps force you to wait for a connection — your receipt scan hangs, your report won't submit, and you're stuck refreshing. Expensify's frontend tackles this head-on with an explicit classification system: every feature gets assigned one of four offline handling patterns, from silent optimistic updates to full-screen blocking, so the app keeps working even when the network doesn't.
Think of it like writing checks from a checkbook — you write the check immediately (optimistic update) and trust the bank will process it later. When the server pushes data, it flows through Pusher (real-time WebSocket) into Onyx (a custom key-value store that persists everything to disk), then into React components via the useOnyx() hook. When you take an action, it flows back through an Action → XHR → Server loop. Every feature is classified into one of four offline patterns: Pattern A assumes success silently (like sending a chat message), Pattern B shows a loading indicator but proceeds optimistically, Pattern C blocks the form until confirmation, and Pattern D blocks the entire page. A decision flowchart in the repo's philosophy docs determines which pattern applies.
If you're a React Native developer who wants to study how a production-grade offline-first app handles state, networking, and cross-platform complexity — this is your reference codebase. Also valuable if you're building a financial or messaging app and need a proven pattern for offline data sync. Not useful if you want a self-hostable expense solution — the closed-source backend makes that impossible.
Worth studying as a reference architecture if you build React Native apps, especially for the offline-first patterns and Onyx state management. It is production-proven — 15 million+ users, publicly traded company, daily releases. However, you cannot self-host it or use it independently because the backend is proprietary. Treat it as a learning resource and contribution opportunity, not a framework to install.
Deep-dive insight, Easy and Pro modes, plus action playbooks — the full breakdown is one tap away.