Creates 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 useMultiplayerDemo(
  options: UseMultiplayerDemoOptions & TLStoreSchemaOptions
): RemoteTLStoreWithStatus
Example
function MyApp() {
  const store = useMultiplayerDemo({ roomId: 'my-app-test-room' })
  return <Tldraw store={store} />
}
Parameters
NameDescription

options

UseMultiplayerDemoOptions &
  TLStoreSchemaOptions

Options for the multiplayer demo sync store. See UseMultiplayerDemoOptions and .

Returns
RemoteTLStoreWithStatus
squashRecordDiffsuseMultiplayerSync