React claims to bring performance improvements by introducing virtual DOM, and in fact React needs to virtual DOM because its architecture, state change is full, then trigger render Returns the full amount of the new virtual DOM tree structure, which determines how to incrementally update the DOM by comparing the old and new virtual DOM structures. So react in fact because there is no virtual dom + Diff + Patch, there will be serious performance problems, so only to do so, and not because of doing a good performance. Think, whether it's MVVM or the traditional JQuery selector development pattern, DOM changes are incremental in nature, so performance is no worse than React. In fact, React because the change to design state (which can be understood as the View Model) must be full, which causes it to have to diff the Old state and new state First, and then diff old virtual D OM and New virtual DOM, because this step is more, so it's actually slower than the traditional mode. They say that the diff and virtual DOM diff is very fast because the objects are very lightweight, in fact, we now touch the react material UI Tab plug-in, Sliding on the phone to switch the problem, after repeated testing and comparison verification, is because each frame of the slide, will trigger SetState, and then trigger the render update inline on the div style to respond to user requests to make a sliding effect, very lag. and Material UI plug-in is strictly in compliance with the React guidance, rewrite this plug-in performance issues, I have to violate the React rules, not every time the sliding setState, but through the DOM to directly update the CSS, even if not with CSS 3 , the speed on the phone also becomes normal. In addition React the one-way data flow, actually use down, also not good ah! The component of the view layer made by react looks good, but it just looks like this, actually to be modular, to find that React provides a very weak mechanism, you have to use very strange andCrappy way to achieve the desired component effect. 2016.11 Month Update: React architecture we gave up after applying in a project, finally we chose the Angular 2 architecture, is a complete framework, application TypeScript and many advanced software development ideas, in the "Big Front", In the "front end backend" trend, Angular 2 is ahead.
React is actually more stuttering than the MVVM schema