fn
tryOnMounted
v0.0.1testeddemoCall onMounted if it's inside a component lifecycle hook, otherwise just calls it
Examples
ts
tryOnMounted(() => console.log('Mounted!'));ts
tryOnMounted(() => console.log('Mounted!'), { sync: false });Demo
Loading demo…
Signature
ts
export function tryOnMounted(fn: VoidFunction, options: TryOnMountedOptions ={ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
fn | VoidFunction | The function to call |
options? | TryOnMountedOptions | The options to use |