#
#
#FFFFFF2019-06-10 11:45:06
Vue.js
#FFFFFF, 2019-06-10 11:45:06

What is the best practice for passing data between components?

Hello.
The question arose: some data is requested from the server in one component (displayed via v-for), and then the same data is needed in another component, while they have a common parent.
If these components were in different parts of the application, Vuex would probably have to be used. But here the components between which you need to pass data are in the same parent, so it seems that there may be a more lightweight way (but, perhaps, not emit).
Maybe there is some way, which in this case would be the best practice?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
denzago, 2019-06-10
@denzago

Maybe my example will help - here several nested components data is synchronized through the model

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question