3 ms·
I think the beginning of this article is spot on. A declarative UI library for the web needs to have something like virtual DOM so that the actual DOM is strate
by lopatin 11y ago
I think the beginning of this article is spot on. A declarative UI library for the web needs to have something like virtual DOM so that the actual DOM is strategically updated when a higher level component updates. No DOM state like input focusing is lost. The part that I don't understand is when the author mentions that the "nifty algorithms that operate on the Virtual DOM" are the key to React's speed. It was my understanding that 1: There are no algorithms that operate on the virtual dom. It is blindly updated every time a component update happens. And 2: That the algorithms that compare the virtual dom and the real dom are the essence of the "Virtual DOM" idea. In this sense, React is no different from the other declarative UI frameworks out there and this is where the point of the article was lost to me.