TanStackT
TanStack4mo ago
2 replies
endless-jade

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.
Was this page helpful?