Skip to content

Commit 3aaa6fa

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/v2/guide/list.md

Lines changed: 2 additions & 0 deletions
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">Avoid using non-primitive values as key, use string/number value instead.</p>
237+
236238
## Array Change Detection
237239

238240
### Mutation Methods

0 commit comments

Comments
 (0)