Matt-Esch/virtual-dom

Patch update all subsequent nodes

paulocheque opened this issue · 3 comments

Example of the image: I have 1 root node with 5 children.

screen shot 2016-04-24 at 2 33 21 am

If I add one node between 1 and 2, the diff returns 1 node of difference, but the patch 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.

I don't think it should touch that has not changed.

Could you simply be needing the "key" property? See this issue: #391

Yes, it is related to the key and different ids. My mistake probably.