• Attach any Hydrateless enhancer to a template ref for the lifetime of a component. Returns a shallow ref to the enhancer's imperative API; the instance is destroyed automatically on unmount.

    const el = ref<HTMLElement | null>(null);
    const tabs = useEnhancer(el, enhanceTabs);
    tabs.value?.setValue('install');

    Type Parameters

    • Api = null

    Parameters

    • target: Ref<undefined | null | HTMLElement>
    • enhance: (container: HTMLElement) => EnhancerHandle<Api>

    Returns ShallowRef<null | Api>