Composables
useForwardPropsEmits
useForwardProps merged with useEmitAsProps, which is the one most wrapper components call directly.
Advanced. This is a primitive-authoring utility from
@vyui/core that most app code never calls 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>>