• Public
  • Public/Protected
  • All

Interface ReplicacheOptions

The options passed to Replicache.


  • ReplicacheOptions



Optional batchURL

batchURL: undefined | string

This is the URL to the server endpoint dealing with the batch updates. See Server Setup Upstream Sync for more details.

Optional dataLayerAuth

dataLayerAuth: undefined | string

This is the authentication token used with the upstream batch server as well as the client view.

Optional diffServerAuth

diffServerAuth: undefined | string

The diff server deals with computing the diffs in the downstream sync. This is the auth token for the diff server if any.


diffServerURL: string

The diff server deals with computing the diffs in the downstream sync. This is the URL to talk to get the diffs as needed.

Optional name

name: undefined | string

The name of the Replicache database. This defaults to "default".

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.

Optional pushDelay

pushDelay: undefined | number

The delay between when a change is made to Replicache and when Replicache attempts to push that change.

Optional syncInterval

syncInterval: undefined | null | number

The duration between each sync. Set this to null to prevent syncing in the background.

Optional wasmModule

wasmModule: undefined | string | Request | URL | Response | ArrayBufferView | ArrayBuffer | Module

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:

wasmModule: '/static/replicache.wasm',

Generated using TypeDoc