TldrawEditorWithoutStoreProps
See source codeTable of contents
Extends TLStoreBaseOptions.
Props for the Tldraw and TldrawEditor components, when not passing in a directly. If you would like to pass in a store directly, use TldrawEditorWithStoreProps.
interface TldrawEditorWithoutStoreProps extends TLStoreBaseOptions {}Properties
assets
optional
from TLStoreBaseOptions
How should this store upload & resolve assets?
assets?: TLAssetStoredefaultName
optional
from TLStoreBaseOptions
The default name for the store.
defaultName?: stringinitialData
optional
from TLStoreBaseOptions
The initial data for the store.
initialData?: SerializedStore<TLRecord>migrations
optional
Additional migrations to use in the store
migrations?: readonly MigrationSequence[]persistenceKey
optional
If you would like to persist the store to the browser's local IndexedDB storage and sync it across tabs, provide a key here. Each key represents a single tldraw document.
persistenceKey?: stringsessionId
optional
sessionId?: stringsnapshot
optional
A starting snapshot of data to pre-populate the store. Do not supply both this and
initialData.
snapshot?: TLEditorSnapshot | TLStoreSnapshotstore
optional
store?: undefinedMethods
onMount
optional
from TLStoreBaseOptions
Called when the store is connected to an Editor.
Parameters
| Name | Description |
|---|---|
|
Returns
(() => void) | voidPrev
TldrawEditorBasePropsNext
TldrawEditorWithStoreProps