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 'reka-ui'
const props = defineProps<CompEmitProps>()
const emits = defineEmits<CompEmitEmits>()
const forwarded = useForwardPropsEmits(props, emits)
</script>
<template>
<Comp v-bind="forwarded">
...
</Comp>
</template>