If this is the parent component…
component-a.vue:
<template>
<component-b>
<component-c></component-c>
</component-b>
</template>
… is there a way to find the instance of component-a
from inside component-c
?
Essentially…
component-c.vue:
<script>
export default {
mounted() {
console.log('I was instantiated in: ' + $???.$options._componentTag);
}
}
</script>
… should print “I was instantiated in: component-a
”.
I think in React component-a
is said to be the “owner component” of component-c
.