T
T
tryToFrontEnd2021-12-13 13:18:13
Vue.js
tryToFrontEnd, 2021-12-13 13:18:13

How to pass an event through many components?

Actually, the question is this:
If we need to transfer data from parent to child to an arbitrarily deep level, we can use provide/inject, but if we need to do it in the opposite direction? Does it just emit an event through dozens of components? Or would it be preferable to use bus/vuex?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-12-13
@tryToFrontEnd

If we need to pass data from parent to child to an arbitrarily deep level, we can use provide/inject, but if we need to go in the opposite direction?

Similar. "Flip through" the component's method with provide - "in the opposite direction" will come down to calling it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question