Answer the question
In order to leave comments, you need to log in
How to avoid binding the same variable to multiple copies of the component?
The situation is the following. We are talking about Vue JS 2.
I need all copies of the componentX component to react to changes in the testArray array , but I did not find a way other than creating a binding via v-bind of the component property (prop) to the testArray variable . And the model of communication between components does not seem to imply anything else.
It turns out that I have about 100 copies of components with constant binding to the same variable. Will this load the system a lot and is it possible to somehow optimize this madness?
I would be grateful for help.
Answer the question
In order to leave comments, you need to log in
I found a solution in the form of a ref option , through which you can access all child components. Very comfortably.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question