Home > Web Front-end > Front-end Q&A > What is the difference between vue and react monitoring data?

What is the difference between vue and react monitoring data?

青灯夜游
Release: 2020-11-13 11:29:26
Original
2639 people have browsed it

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.

What is the difference between vue and react monitoring data?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template