[Vuejs]-How to remove this.$set when migration from vue2 to vue3

1👍

You don’t need vue Set anymore because reactivity is now work fine in Vue3.

So to replace this.$set for an array you can juste do that:

// Old vue2 -> this.$set(array, index, null);
this.array[index] = null

So in each use you have, you just need to do the basic JS you need, and do not care about reactivity issue :).

Leave a comment