Currently in the process of migrating a project from Vue 2 to Vue 3, I find myself searching for a way to determine if a component is loaded, and if not, how to load a GenericComponent as a placeholder. In Vue 2, I was able to accomplish this task using the provided sample code. However, as I delve into the Vue 3 documentation, I am struggling to find any information on this particular topic.
import Vue from 'vue'
import GenericComponent from 'components/GenericComponent'
if (!Vue.options.components['custom-component']) {
Vue.component('custom-component', GenericComponent)
}