Skip to content

use/useForwardPropsEmits

Overview

A fixed wrapper around reka-ui's useForwardPropsEmits that correctly handles both the array form and the object form of defineEmits. reka-ui's built-in useEmitAsProps reads vm.type.emits and calls forEach on it, which fails when defineEmits is called with the object validator form (e.g. { 'update:open': null }) because that produces an object, not an array. This module handles both forms.

Methods

Source

client/lib/use/useForwardPropsEmits.js:1

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2