I have many components that use the same children components. I am trying to save myself some time and code by importing all of the components in a .js file, Similar to using mixins in vue. and then import that file into the parent component. Unfortunately the parent component does not recognize these imported components. Seems like a simple ask but having trouble implementing it.
When I log Children in the parent I get a components object with the two vue components I am just not sure how to utilize it in the parent component. I would import them globally however not every component need them so it wouldn't be very efficient.
I also feel like I am importing Components twice into the parent but again am unsure of how to accomplish this so though I would post what I have so far.
thanks for your help
**Children**
export default {
components: {
Popover: () => import('@/components/inline-components/popover'),
Button: () => import('@/components/inline-components/button')
}
}
**Parent**
<template>
<Button>I am the Button</Button>
</template>
import Children from 'utilities/children'
export default {
components: {
Children
}
}
Children
as a mixin. Likemixins: [Children]
? - Husam Ibrahim