@mocanvas/editor · function
declare function hardResetEditor(editor: TLResettableEditor): Promise<void>Tear one editor down and hard-reset the origin.
Disposing first matters: the editor holds timers, animation frames and store listeners, and a reload that races them logs a stack of errors from work that was already meaningless. It also drops the reference the reset is about to invalidate, which is the difference between a clean restart and a leak.
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.