Re:New React Developer Tools
by throwaway41597 on Thursday September 03, 2015 @10:54AM
(#10165254)
There isn't a relayout on each DOM change. Changes trigger layout when you read DOM properties such as clientWidth or when the event loop loops.
Can DOM be faster? Maybe so. Does that mean React is a bad idea? No. In fact, React is Multiple Buffering[1] in the age of DOM. It is not that DOM is slow, it is that change of DOM triggers the layout and layout is inherently slow, because it is complex.
If you do not need re-layout on each DOM change (and most of the time you do not), React allows you to batch changes in a very clean way.
[1] https://en.wikipedia.org/wiki/Multiple_buffering