@mocanvas/editor · function

useSvgExportContext

declare function useSvgExportContext(): TLSvgExportContext | null

The export in progress, or null when rendering normally.

null is the answer a component gets on the live canvas, and checking for it is how one component serves both: useSvgExportContext() ? staticVersion : interactiveVersion.

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.