S
S
stimul7772021-09-11 19:05:28
Vue.js
stimul777, 2021-09-11 19:05:28

How to make objects in an array reactive?

Hello everyone, there is an array with objects, how to make objects inside the array reactive?
The objects are then printed out to a table and some properties are bound to the inputs via v-model.
After changing the input, you need to change the object in the array. Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WapSter, 2021-09-11
@wapster92

https://ru.vuejs.org/v2/api/index.html#Vue-set

L
low molecular macro, 2021-09-12
@molekulyarniy

If you use the Composition API, then you simply make the array itself reactive
const arr = ref([]);
and the array elements will become reactive

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question