-
https://dexie.org/docs/liveQuery() Hi, I'm wondering which way you would recommend using dexie js (indexeddb wrapper) with vanJS? would liveQuery observable promise go into vanX.reactive(liveQuery ( |
Beta Was this translation helpful? Give feedback.
Answered by
Tao-VanJS
Sep 28, 2024
Replies: 2 comments
-
Just use const friends = vanX.reactive([])
const friendsObservable = liveQuery (
() => db.friends
.where('age')
.between(50, 75)
.toArray()
)
// Subscribe
const subscription = friendsObservable.subscribe({
next: result => vanX.replace(friends, result),
error: error => console.error(error)
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Tao-VanJS
-
Ok, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just use
subscribe
as they suggested?