I need to programatically create and mount components on the fly from parent component.
It works fine with Vue 2.
import Vue from 'vue'
// ParentComponent.vue
export default {
methods: {
createChild() {
const Child = Vue.extend(ChildComponent)
const child = new Child({
propsData,
store: this.$store,
i18n: this.$i18n
}).$mount()
}
}
}
But I cannot figure out how-to do with Vue 3.
<component v-bind:is="childComponent">instead?