Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Dexie.js inside of dedicated worker?

I have a function that fetch a JSON data via window.fetch and put it inside IndexedDB table via db.table.bulkPut(array_of_data). It takes more than 10 seconds to do that because of large amount of data and it blocks UI and makes UX bad. I have decided to run this task in a Worker, but I have not found any examples how can I make that with Dexie.js or directly with IndexedDB

Thank you for any advice :)

like image 623

1 Answers

Thank you @kaiido for link this is an answer -=> https://github.com/dfahlander/Dexie.js/issues/789

like image 107