Skip to content

Commit 69db436

Browse files
committed
Mention vtree, vdom, and (lack of) keys
1 parent 9b67156 commit 69db436

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Diff two [**Unist**][unist] trees.
44

5+
Based on the [`vtree`][vtree] diffing algorithm in [`virtual-dom`][vdom],
6+
but for Unist.
7+
8+
One caveat is that “Unist” does not support keys. Keys are what allow
9+
performant reordering of children. To deal with that, `unist-diff` uses
10+
“synthetic” keys based on the properties on nodes (excluding their value
11+
or their children). This is not ideal but it’s better than nothing.
12+
Let’s see how it goes!
13+
514
## Installation
615

716
[npm][]:
@@ -193,3 +202,7 @@ following properties:
193202
[propsdiff]: #propsdiff
194203

195204
[movediff]: #movediff
205+
206+
[vtree]: https://github.com/Matt-Esch/virtual-dom/tree/master/vtree
207+
208+
[vdom]: https://github.com/Matt-Esch/virtual-dom

0 commit comments

Comments
 (0)