3 ms·
> However, this article is overly focused on just one element of how React works. Because that is the topic of the article. It never even says "The virtual DO
by edave64 5y ago
> However, this article is overly focused on just one element of how React works.
Because that is the topic of the article.
It never even says "The virtual DOM overhead is a problem". It actually says exactly the opposite, it's often fast enough and not a problem. It didn't call Virtual DOM a meme, it called "the virtual DOM is fast" a meme.
Performance wise, as the article says, it is pure overhead. Virtual DOM is the solution to a problem the javascript frameworks create themselves.
I've had argue against managers that no, using a virtual DOM will not magically make our pure JS app run any faster. Especially once I put in the work to make the DOM as seldom accessed as I could.
There is a fantastic reason these JS frameworks work that way. Instead of building creating and update logic, you just need creation logic and always rebuild the widget. But that's super slow, so you use a virtual DOM to make it faster. Just not as fast as it would have been if you hadn't used the framework.
The tradeoff being that your code is often significantly simpler and easier to maintain. Though that also breaks down in some parts.