There is a component A in vue 3. I would like to write a component that inherits from A by using only A’s template and changing only the script and style.
Is there a way to configure the component in a setup script tag to use the template of component A without creating unnecessary component?
In Vue 2 I could use mixins for this:
<script>
import A from './A';
export default {
mixins: [
A,
],
}
</script>
In Vue 3 I can do it this way:
<template>
<A></A>
</template>
<script setup>
import A from './A';
</script>
But the documentation says that this is not recommended because unnecessarily create a new component and too many components can slow down the page.