docs
docs copied to clipboard
Creating web components with slots and render functions
Vue can be used to create Web Components. The docs explain how to use slots here:
https://vuejs.org/guide/extras/web-components.html#slots
However, that explanation only holds when using a template. With a render function it is necessary to create an actual <slot> node, rather than using the usual Vue slots object. e.g.:
h('slot', { name: 'slot-name' })
This isn't currently documented.
More details in https://github.com/vuejs/core/issues/7843.