@mocanvas/editor · interface

CurrentUser

interface CurrentUser

A preferences object plus the way to replace it — the editor's user prop.

Whoever provides this owns the storage. Pass one built from React state and nothing the editor does can reach a global localStorage key; pass createCurrentUser and the preferences live in a signal for the life of the page.


Methods · 1

setUserPreferences(next: UserPreferencesState): void

Properties · 1

userPreferences: Signal<UserPreferencesState>

Mentioned here

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.