Added onInit and useInitialized hooks
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<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>
|
||||
@@ -0,0 +1 @@
|
||||
export { default as CallOnMount } from './CallOnMount.svelte';
|
||||
Reference in New Issue
Block a user