T
TanStack•15h ago
ambitious-aqua

Long term persistence strategy

What is the best way to use TanStack DB so that the local content is preserved across sessions and tabs? Scenario - 40 MB of data needed from DB to operate offline (approx.) - Re-downloading this every time is expensive. Ideally, data stored on device is used first and updates since last sync are applied - App must be ready to handle offline mode at any moment with all the necessary data for any page - Lazy loading does not meet requirements, because user may be online for pages A and B, but want data for C and D after switching to offline. - I see the ability to use RxDB, but it would be nice to not worry about another subscription.
2 Replies
extended-salmon
extended-salmon•15h ago
GitHub
Offline-First Support Ā· Issue #82 Ā· TanStack/db
Hey TanStack team! šŸ‘‹ I've been loving TanStack DB so far - the reactive collections and optimistic mutations are exactly what I need. I'm wondering if you have any plans to support offline-...
extended-salmon
extended-salmon•15h ago
GitHub
feat(offline-transactions): implement offline-first transaction sys...
Summary šŸš€ Implements comprehensive offline-first transaction capabilities for TanStack DB that provides durable persistence of mutations with automatic retry when connectivity is restored. Initial ...

Did you find this page helpful?