3 ms·
You seem to be saying that VDOM gives no benefits, but in my experience the idea that your view is a function of your state that you can just completely recalcu
by ykler 10y ago
You seem to be saying that VDOM gives no benefits, but in my experience the idea that your view is a function of your state that you can just completely recalculate whenever your state changes is a hugely useful abstraction that makes code much less bug-prone. And it is not available without VDOM because the performance would be terrible if you generated actual DOM this way and you would also lose state like scroll state that might not be reflected in your store. No doubt there are some tricky cases for VDOM. Maybe some of them even warrant using it only selectively although my experience has been that when I started compromising on the purity of the React/Redux model it caused problems. (And I will grant you that this in itself is a weakness of the model because sometimes you can't control where state lives.)