D
D
Dmitry2022-02-17 19:10:27
Vue.js
Dmitry, 2022-02-17 19:10:27

How can I reference a component's function from another component?

620e72f49f022743326314.png

There are two components, one has a function that needs to be executed in the other component when the button is clicked.
How to export it or refer to it in the component with events?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2022-02-17
@Kozack Vue.js

Via ref
https://stackoverflow.com/a/53953674/4543826

D
Dmitry Skrypnik, 2022-02-18
@Shkipon

If these components are not connected in any way, the best option is eventBus, read about it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question