Composables

useForwardPropsEmits

Source
useForwardProps merged with useEmitAsProps — the one most wrapper components call directly.
Advanced. Primitive-authoring utility from @vyui/core — most app code never calls this directly.

Overview

import { useForwardPropsEmits } from '@vyui/core'

const forwarded = useForwardPropsEmits(props, emit)

useForwardProps merged with useEmitAsProps when an emit function is passed. This is the one most wrapper components actually call directly.

Signature

useForwardPropsEmits<T, Name extends string>(props: MaybeRefOrGetter<T>, emit?: (name: Name, ...args: any[]) => void): ComputedRef<T & Record<string, Function>>