Files
xyflow/packages/svelte/src/lib/components/CallOnMount/CallOnMount.svelte
T

15 lines
315 B
Svelte

<script lang="ts">
import { onMount } from 'svelte';
let _onMount: (() => void) | undefined = undefined;
export { _onMount as onMount };
let _onDestroy: (() => void) | undefined = undefined;
export { _onDestroy as onDestroy };
onMount(() => {
_onMount?.();
return _onDestroy;
});
</script>