Home > Article > Web Front-end > What is the difference between vue and react monitoring data?
Difference: The principles of monitoring data changes are different. Vue can accurately know data changes through "getter/setter" and the hijacking of some functions; while React uses reference comparison (diff) by default, which does not accurately monitor data changes. If it is not optimized, it may lead to a large number of unnecessary VDOMs. Re-render.
Vue.js is a progressive framework for building user interfaces. Unlike other heavyweight frameworks, Vue adopts a bottom-up incremental development design. Vue's core library only focuses on the view layer, and is very easy to learn and integrate with other libraries or existing projects.
React is a JAVASCRIPT library used to build user interfaces. It is mainly used to build UI. Many people think that React is the V (view) in MVC. React originated as an internal project at Facebook to build the Instagram website and was open sourced in May 2013. It has high performance and very simple code logic. More and more people have begun to pay attention to and use it.
The difference between vue and react in monitoring data: the principles of monitoring data changes are different
Vue hijacks getters/setters and some functions. Can accurately know data changes.
React uses reference comparison (diff) by default. If it is not optimized, it may lead to a large number of unnecessary VDOM re-rendering.
Why doesn’t React accurately monitor data changes?
This is because of the difference in design concepts between Vue and React. Vue uses mutable data, while React emphasizes the immutability of data. There is no good or bad distinction between the two. Vue is simpler. React is more robust when building large applications.
For more programming-related knowledge, please visit: Programming Learning Website! !
The above is the detailed content of What is the difference between vue and react monitoring data?. For more information, please follow other related articles on the PHP Chinese website!