Closed paulocheque closed 8 years ago
I don't think it should touch that has not changed.
Could you simply be needing the "key" property? See this issue: https://github.com/Matt-Esch/virtual-dom/issues/391
Yes, it is related to the key and different ids. My mistake probably.
Example of the image: I have 1 root node with 5 children.
If I add one node between 1 and 2, the
diff
returns1 node of difference
, but thepatch
update the nodes 2, 3, 4 and 5, besides adding the new node between 1 and 2.Is this an expected behaviour? I am adding unique keys dynamically, but I am not sure if I am missing anything.
This results in a bad performance. If the
patch
only add the new element, then we have good performance.