useForwardPropsEmits
Combinations for useForwardProps & useEmitAsProps
This composable is just a wrapper for useForwardProps & useEmitAsProps composables. Doing so it returns only 1 object that is designed to be use with v-bind
directly.
Usage
vue
<script setup lang="ts">
import { useForwardPropsEmits } from 'radix-vue'
const emits = defineProps<CompEmitEmits>()
const props = defineEmits<CompEmitProps>()
const forwarded = useForwardPropsEmits(props, emits)
</script>
<template>
<Comp v-bind="forwarded">
...
</Comp>
</template>