The options passed to Replicache.
This is the URL to the server endpoint dealing with the batch updates. See Server Setup Upstream Sync for more details.
The diff server deals with computing the diffs in the downstream sync. This is the auth token for the diff server if any.
The diff server deals with computing the diffs in the downstream sync. This is the URL to talk to get the diffs as needed.
The name of the Replicache database. This defaults to
You can use multiple Replicache instances as long as the names are unique.
Using different names for different users allows you to switch users even when you are offline. See sample/redo for inspiration on how to do this.
The delay between when a change is made to Replicache and when Replicache attempts to push that change.
The duration between each sync. Set this to
null to prevent syncing
in the background.
By default we will load the Replicache wasm module relative to the Replicache js files but under some circumstances (like bundling with old versions of Webpack) it is useful to manually configure where the wasm module is located on the web server.
If you provide your own path to the wasm module it probably makes sense to use a relative URL relative to your current file.
wasmModule: new URL('./relative/path/to/replicache.wasm', import.meta.url),
You might also want to consider using an absolute URL so that we can find the wasm module no matter where your js file is loaded from:
Generated using TypeDoc