useDelaySvgExport

See source code

Delay an SVG export until the returned function is called. This is useful if e.g. your shape loads data dynamically, and you need to prevent the export from happening until after the data is loaded.

If used outside of an SVG export, this hook has no effect.

function useDelaySvgExport(): () => void

Example

const readyForExport = useDelaySvgExport()

return <MyDynamicComponent onDataLoaded={() => readyForExport()} />
Prev
useContainerIfExists
Next
useEditor