Closed Grafikart closed 2 years ago
I think the issue with this is it will always do a redraw of all elements then. I feel like the more efficient approach would be when doing a placement, determine if that needs to be an appendChild() or an insertBefore(). I just can't figure out how you would determine that without tracking indexes.
When an element is updated, it is not moved, so if a previous element is added to the dom (PLACEMENT) the HTML structure doesn't reflect the virtual DOM.
This tree will produce the following structure (with the div positionned after the
<a/>
)