From b15dcb44c0fc89c9d9b7ffee7000081c56ef5148 Mon Sep 17 00:00:00 2001 From: Matthew Pietz Date: Fri, 6 May 2016 09:04:37 -0700 Subject: [PATCH] Add a note about frozen objects and v-for Part of vuejs/vue#2809 --- src/guide/list.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/guide/list.md b/src/guide/list.md index 4104b82db3..14c80689e3 100644 --- a/src/guide/list.md +++ b/src/guide/list.md @@ -223,6 +223,10 @@ You can just do: this.items.$remove(item) ``` +#### Using `Object.freeze()` + +When iterating over an array of objects frozen with `Object.freeze()`, you need to explicitly use a `track-by` key. A warning will be displayed in this scenario when Vue.js is unable to track objects automatically. + ## Object v-for You can also use `v-for` to iterate through the properties of an Object. In addition to `$index`, each scope will have access to another special property `$key`.