@mocanvas/mocanvas · function

useUiEvents

declare function useUiEvents(): TLUiEventHandler

Report a UI event.

Always returns a function, so a component can call it unconditionally; with no provider the call is a no-op rather than an error, which is what lets a panel be rendered on its own in a test.

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.