0👍
Here is how to achieve a render function in Vue:
App.vue
<script setup>
import Comp from './Comp.vue'
</script>
<template>
<comp>
cool slot
</comp>
</template>
Comp.vue
<script>
import { h } from 'vue'
export default {
setup(props, { slots }) {
return () => h('form', slots.default())
}
}
</script>
Here is the doc if you want more details (+ the approach for JSX).
- [Vuejs]-How to make splitting two date ranges with nested functions and making a request to the API with Javascript
- [Vuejs]-Updating Nested Objects in Vue using VeeValidate Form issue
Source:stackexchange.com