UseSyncDemoOptions

See source code
Table of contents
interface UseSyncDemoOptions {}

Properties

roomId

The room ID to sync with. Make sure the room ID is unique. The namespace is shared by everyone using the demo server. Consider prefixing it with your company or project name.

roomId: string

userInfo

optional

A signal that contains the user information needed for multiplayer features. This should be synchronized with the userPreferences configuration for the main <Tldraw /> component. If not provided, a default implementation based on localStorage will be used.


Methods

getUserPresence

optional

A reactive function that returns a TLInstancePresence object. The result of this function will be synchronized across all clients to display presence indicators such as cursors. See getDefaultUserPresence for the default implementation of this function.

Parameters

NameDescription

store

user

Returns


Prev
WebSocketMinimal
Next
UseSyncOptions