简体   繁体   中英

How to use useLiveQuery in JavaScript while writing to IndexedDB from WebAssembly

Is it possible use useLiveQuery from 'dexie-react-hooks' when writing to IndexedDB from WebAssembly (using Rexie )?

I've tried implementing it, but useLiveQuery is not updating. I think this might be because the database transactions need to go through the js Dexie db instance, but I'm not sure. Is there a way to make this work?

useLiveQuery() will only detect updates done via Dexie.js, so if another indexedDB wrapper is used it will not detect changes since there are no native reactivity in indexedDB.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM