Home>Article>Web Front-end> What can vue and react do

What can vue and react do

藏色散人
藏色散人 Original
2021-01-21 09:23:38 1756browse

vue can make the development of web-based front-end applications more convenient, because Vue.js has declarative, responsive data binding, component-based development, and also uses Virtual DOM; React is available For creating web user interaction interfaces, it introduces a new way to deal with the browser DOM.

What can vue and react do

The operating environment of this tutorial: windows7 system, react17.0.1&&vue2.0 version, Dell G3 computer.

Related recommendations: "vue.js Tutorial"

What can vuet do?

Vue.js is a progressive framework for building data-driven web interfaces. The goal of Vue.js is to enable responsive data binding and composed view components with the simplest possible API. Vue's core library only focuses on the view layer, and is very easy to learn and integrate with other libraries or existing projects. Vue, on the other hand, is fully capable of driving complex single-page applications developed using single-file components and libraries supported by the Vue ecosystem.

The goal of Vue.js is to implement responsive data binding and combined view components through the simplest possible API

Vue.js can make the development of web-based front-end applications more convenient , because Vue.js has declarative, responsive data binding, component-based development, and also uses Virtual DOM.

Vue can simply write a single page or a large front-end system.

Vue can make front-end single-page applications from simple to complex. Web front-ends that can be seen everywhere can be developed with Vue.

Application scenarios:

If you are still using jquery to frequently operate your DOM to update the page, then you can use Vue.js to liberate your DOM Operated.

If there are multiple parts in your project that are the same and can be encapsulated into a component, then you can try using Vue.js.

In addition, the core implementation of Vue.js uses the Object.defineProperty feature of ES5, which is incompatible with browsers of IE8 and below. Therefore, your project needs to be compatible with these lower versions of browsers. , then Vue.js is not applicable.

After all, the purpose of developing a project is not to use a certain framework.

What can react do?

React is a JavaScript framework for building "predictable" and "declarative" Web user interfaces, which allows Facebook to develop Web applications faster.

React can be used to create web user interaction interfaces. It introduces a new way to deal with the browser DOM.

Gone are the days when you need to manually update the DOM and laboriously record every state - this old method is neither scalable nor difficult to add new features, even if it can , but also taking a lot of risks.

React uses a very novel way to solve these problems. You only need to declaratively define the user interface at each point in time, and the unordered relationship determines which part of the DOM needs to be updated when the data changes. At any point in time, React can update the entire application with minimal DOM modifications.

React introduces some exciting new concepts that challenge some existing best practices. Learning these concepts will help you understand their advantages and create highly scalable single page applications (SPA). React puts the main focus on the "view" part of the application and does not limit the way to interact with the server and organize the code.

Working status:

React is based on rendering functions. These functions read in the current state and convert it into a virtual representation on the target page. Whenever React is notified of a change in state, it reruns these functions, calculates a new virtual representation of the page, and then automatically converts the results into the necessary DOM updates to reflect the new representation.

This approach seems to be slower than the usual JavaScript solution of updating each element as needed, but React does this: it uses a very efficient algorithm to calculate the virtual page The differences between the current version and the new version, and the necessary minimum updates to the DOM based on these differences. React wins by minimizing redrawing and avoiding unnecessary DOM operations, both of which are recognized performance bottlenecks.

The above is the detailed content of What can vue and react do. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:Is web a web page? Next article:Is web a web page?