Skip to content

Commit 813c887

Browse files
Leyth AdanNataliaTepluhina
andauthored
enclosed a word intended to clarify meaning of diff (#1304)
* enclosed a word intended to clarify meaning of diff * Update src/api/special-attributes.md Co-authored-by: Natalia Tepluhina <tarya.se@gmail.com>
1 parent 45b9049 commit 813c887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/special-attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- **Expects:** `number | string | symbol`
66

7-
The `key` special attribute is primarily used as a hint for Vue's virtual DOM algorithm to identify VNodes when diffing the new list of nodes against the old list. Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed/destroyed.
7+
The `key` special attribute is primarily used as a hint for Vue's virtual DOM algorithm to identify VNodes when comparing the new list of nodes against the old list. Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed/destroyed.
88

99
Children of the same common parent must have **unique keys**. Duplicate keys will cause render errors.
1010

0 commit comments

Comments
 (0)