Skip to content

Commit e62df86

Browse files
committed
tracky -> track-by
1 parent 3e681ab commit e62df86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/guide/list.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ demo.items = demo.items.filter(function (item) {
155155

156156
You might think this will blow away the existing DOM and re-build everything. But worry not - Vue.js recognizes array elements that already have an associated Vue instance and will reuse those instances whenever possible.
157157

158-
## Using `trackby`
158+
## Using `track-by`
159159

160-
In some cases, you might need to replace the Array with completely new objects - e.g. ones returned from an API call. If your data objects have a unique id property, then you can use a `trackby` attribute to give Vue.js a hint so that it can reuse an existing instance with data that has the same id.
160+
In some cases, you might need to replace the Array with completely new objects - e.g. ones returned from an API call. If your data objects have a unique id property, then you can use a `track-by` attribute to give Vue.js a hint so that it can reuse an existing instance with data that has the same id.
161161

162162
For example, if your data looks like this:
163163

@@ -173,7 +173,7 @@ For example, if your data looks like this:
173173
Then you can give the hint like this:
174174

175175
``` html
176-
<div v-repeat="items" trackby="_uid">
176+
<div v-repeat="items" track-by="_uid">
177177
<!-- content -->
178178
</div>
179179
```

0 commit comments

Comments
 (0)