Is it possible to pass a component as a prop from the parent to a child component without directly importing it into the child?
Parent Component:
<template>
<ChildComponent :component="componentName">
</template>
<script>
import componentName from '@/components/componentName.vue'
</script>
Child Component:
<template>
<div>
<component :is="component">
</div>
</template>
<script>
props: {
component: Object
}
</script>
In this current setup, I am encountering an error stating Unknown custom event. Did you register the component correctly?. I understand that the component needs to be registered in the child component, but is there a way to pass the import via props instead of directly importing? Is this feasible?