I have an issue with pouch db that causes the UI thread to be sluggish when using put().
I was hoping to use this plugin to fix this.
I had issues make PouchDB work and I hope this isn't the root cause.
- in
tsconfig.json add "allowSyntheticDefaultImports": true
import PouchDB from "pouchdb";
let db = new PouchDB("db");
So far the original setup which works on the UI thread.
Now when doing the following
...
import "worker-pouch";
...
let db= new PouchDB("db", { adapter: "worker" });
I'm getting an error: Invalid Adapter: worker
When using:
var PouchDB = require('pouchdb');
PouchDB.adapter('worker', require('worker-pouch'));
I'm getting an error: PouchDB.adapter is not a function
I've also tried with PouchDB.plugin(require('worker-pouch')) but it didn't work too, something with immutable...
Help would be appreciated, I'm probably missing a simple thing...
I have an issue with pouch db that causes the UI thread to be sluggish when using
put().I was hoping to use this plugin to fix this.
I had issues make PouchDB work and I hope this isn't the root cause.
tsconfig.jsonadd"allowSyntheticDefaultImports": trueimport PouchDB from "pouchdb";let db = new PouchDB("db");So far the original setup which works on the UI thread.
Now when doing the following
I'm getting an error:
Invalid Adapter: workerWhen using:
I'm getting an error:
PouchDB.adapter is not a functionI've also tried with
PouchDB.plugin(require('worker-pouch'))but it didn't work too, something with immutable...Help would be appreciated, I'm probably missing a simple thing...