Vue 2 object reactivity limits0:35
So let's open up the Vue 2 app. So I have a person object with a name field on it, and then I'm trying to add my old age here. delete deletes the age, and set is what actually allows change detection on objects to work in Vue 2. So you give it the object, you give it the property and the value, and that should work. So that's in the documentation here, right here. So if I click this, this should add a height or my height here, and it does work, but these two do not work. If I click this, it doesn't work.
Vue 2 array change detection1:31
So for arrays, let's take a look at that. It says it can't detect when you're using an index to update an array, and it can't detect if you're changing the length. So again, that's what I'm trying to do here, and you'll see that it doesn't work. So back to our code. So push does work. And that's what I'm doing here, I'm pushing William to the array, so let's see that. So that triggers the change detection, but again, these two do not. So for this, I am changing Andre to Aaron, and it doesn't work. And this, I am changing the array length to one, and it doesn't work.
