I tried this:
Worker.run(async (batchPatch) => {
const { useBatchesApi } = await import("@/hooks/useBatches")
const { update } = useBatchesApi()
return update(batchPatch)
}, [batchPatch])
.then(console.log)
.catch(console.error)
But then I get Failed to resolve module specifier '/src/hooks/useBatches.ts?t=1649663469345'. I've been trying for hours now just to make the update method work. Please tell me there's a way to do this.
I tried this:
But then I get
Failed to resolve module specifier '/src/hooks/useBatches.ts?t=1649663469345'. I've been trying for hours now just to make the update method work. Please tell me there's a way to do this.