Answer the question
In order to leave comments, you need to log in
How to create an array of reactive variables?
I apologize right away, I am tongue-tied and can use the wrong words and concepts.
The crux of the matter is this.
I request and receive an array of data, it contains the names of categories and the number of elements inside (which is not the point).
Next, I need to create an accordion for each category and toggle it back and forth.
I can't figure out how to implement this within the framework of 1 component. I have a need for a button that would switch a boolean variable back and forth, but I can’t dynamically create them (an array of variables) so that then they would be reactively processed.
People point your finger to the idiot in the right direction.
Answer the question
In order to leave comments, you need to log in
Array or object? If it's an array, is it possible to convert it to an object? For reactivity use Vue.set
Convert the data array to a collapse data array in which to add a flag for the elements and open / close on it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question