I installed vue-cli and made some components, and everything was working great until I had to update some object values with keys
obj = {
key1: value1,
key2: value2,
key3: value3
};
The data is updating, but the view isn't updating and when I dig into Vue documentation it says
Due to limitations in JavaScript, Vue cannot detect the following changes to an array:
- When you directly set an item with the index, e.g. vm.items[indexOfItem] = newValue
The solution would be to use Vue.set() but when try that (inside my component) I get the following result:
Vue.set(example1.items, indexOfItem, newValue);
Uncaught ReferenceError: Vue is not defined
import Vue from 'vue';