Best practices for large-scale offline-first app with useLiveQuery + state management ? #5135
Unanswered
jonathan-pyt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Stack:
Context:
SQLite is our single source of truth. We use useLiveQuery with some additions like debounce and enabled options to make it more manageable.
One issue we've encountered with Expo Router: when navigating between stacks, components aren't unmounted — they stay in memory. This means live queries keep running in the background across different stacks, listening for changes and re-executing even when the screen isn't visible. We've had to manually handle this with the enabled option based on focus state, which adds boilerplate.
The Problems:
As the app scales, we're hitting friction points:
Considering React Query:
We're thinking about migrating to React Query for:
But we'd lose the automatic "live" reactivity that useLiveQuery provides.
Questions:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions