Answer the question
In order to leave comments, you need to log in
How to refer to a component method through ref?
In vue, sometimes there were situations when there was something like this structure.
<div>
<SomeComponent ref="someComp"}/>
</div>
mounted() { this.$refs.somComp.someMethod() }
Answer the question
In order to leave comments, you need to log in
No. Components hide their logic from their parents, and parents don't have to know anything about the implementation of their children. From top to bottom, you can descend data, and from top to bottom, you can pass events. That's all there is about communication between components.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question