@mocanvas/sync · interface

UseSyncOptions

interface UseSyncOptions

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Properties · 8

clientId?: string
enabled?: boolean

Set false to stay offline (a read-only view, say). Default true.

onError?: (error: Error) => void
presence?: boolean

Share this editor's cursor and selection. Default true.

presenceThrottleMs?: number
presenceTimeoutMs?: number
roomId: string
transport: Transport | (() => Transport)

The channel to the room. Pass a factory when the transport should be recreated with the room (the usual case); it is read once per connection.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.