@mocanvas/sync · function

useSync

declare function useSync(editor: Editor | null, options: UseSyncOptions): UseSyncResult

Connect an editor's store to a room for as long as the component is mounted. Everything is torn down (including the transport) on unmount.

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.