useSyncDemo
See source codeCreates a tldraw store synced with a multiplayer room hosted on tldraw's demo server https://demo.tldraw.xyz.
The store can be passed directly into the <Tldraw /> component to enable multiplayer features.
It will handle loading states, and enable multiplayer UX like user cursors and following.
All data on the demo server is
- Deleted after a day or so.
- Publicly accessible to anyone who knows the room ID. Use your company name as a prefix to help avoid collisions, or generate UUIDs for maximum privacy.
function useSyncDemo(
  options: UseSyncDemoOptions & TLStoreSchemaOptions
): RemoteTLStoreWithStatusExample
function MyApp() {
  const store = useSyncDemo({ roomId: 'my-app-test-room' })
  return <Tldraw store={store} />
}Parameters
| Name | Description | 
|---|---|
| 
 | Options for the multiplayer demo sync store. See UseSyncDemoOptions and . | 
Returns
Prev
useSyncNext
centerSelectionAroundPoint