I encountered a use case where the vTree/vNodes are desynchronized from the actual DOM. This plays badly with the diffing/update mechanism, as from the snabbdom point of view, nothing has changed, while the DOM indeed changed. In this case (which I can detect), I would like to force the DOM to update to reflect the vTree, that is unplug the diffing algorithm for that specific vTree.
thinking that would be enough for the library to understand that that vNode is different from another vNode with the same data (hence it should update the DOM instead of doing nothing) but that seems to fail.
I encountered a use case where the
vTree
/vNodes
are desynchronized from the actual DOM. This plays badly with the diffing/update mechanism, as from thesnabbdom
point of view, nothing has changed, while the DOM indeed changed. In this case (which I can detect), I would like to force the DOM to update to reflect thevTree
, that is unplug the diffing algorithm for that specificvTree
.Is there an easy way to do this?
I tried using
key
as inthinking that would be enough for the library to understand that that
vNode
is different from anothervNode
with the same data (hence it should update the DOM instead of doing nothing) but that seems to fail.