by slidehero · 1y ago · 0 comments
Could you give a practical example of what you mean here? I can't quite wrap my head around what kind of interaction you're describing.
Do you mean some kind of scenario like a shared document with multiple people editing it? This is a very niche case.
> This means when the DOM resets, there's no problem with elements getting removed and added back in,
Could you give a practical example of this? I've been building web apps for a long time and I don't know what "when the dom resets" means.
React solves this problem by building a virtual DOM, and then conservatively updating the actual DOM (sometimes just mutating individual HTML attributes!) so that this state is preserved.