Skip to content

Commit 3b224a3

Browse files
committed
Specify which types are allowed as values for 'key' of 'v-for'
1 parent 42348d2 commit 3b224a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/v2/guide/list.md

+2
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ It is recommended to provide a `key` with `v-for` whenever possible, unless the
233233

234234
Since it's a generic mechanism for Vue to identify nodes, the `key` also has other uses that are not specifically tied to `v-for`, as we will see later in the guide.
235235

236+
<p class="tip">Don't use non-primitive values like objects and arrays as `v-for` keys. Use string or numeric values instead</p>
237+
236238
## Array Change Detection
237239

238240
### Mutation Methods

0 commit comments

Comments
 (0)