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ā¢15h ago
see this discussion https://github.com/TanStack/db/issues/82
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ā¢15h ago
there's also this WIP PR https://github.com/TanStack/db/pull/559
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 ...