@mocanvas/editor · function

useTLStore

declare function useTLStore(options?: TLStoreOptions): EditorStore

A store built from the given options, memoised.

Rebuilt only when the schema inputs or the document inputs change. In particular a new assets object does *not* rebuild the store: the asset store is a seam onto the host's own uploader, apps routinely construct one inline, and swapping it is not a reason to discard the document.

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.