Home > Web Front-end > Vue.js > body text

What are the features of vue.js?

青灯夜游
Release: 2020-11-25 17:11:30
Original
5772 people have browsed it

Vue.js features: 1. MVVM mode; 2. Componentization, which can extend HTML elements and encapsulate reusable code; 3. Instructions, whose function is to change a certain value accordingly when the value of its expression changes. These behaviors are applied to DOM; 4. Two-way data binding; 5. Virtual DOM; 6. State management.

What are the features of vue.js?

Vue.js is a progressive framework for building user interfaces. Unlike other heavyweight frameworks, Vue fundamentally adopts a minimum-cost, incrementally adoptable design. Vue's core library focuses solely on the view layer and is easy to integrate with other third-party libraries or existing projects. On the other hand, Vue is also perfectly capable of powering complex single-page applications when combined with single-file components and libraries supported by the Vue ecosystem.

Vue.js features

1. MVVM mode

M:model, business model, purpose: processing data and providing data.

V:view, user interface, user view.

When the data in the business model model changes, the user view also changes accordingly.

When the user view changes, the data in the business model model can also change.

2. Componentization

Component (Component) is one of the most powerful features of Vue.js. Components can extend HTML elements, encapsulating reusable code.

In Vue, parent-child components communicate through props, one-way transmission from parent to child. The child component communicates with the parent component and notifies the parent component of data changes by triggering events. This forms a basic father-child communication model.

When the components during development have a very close relationship with HTML, JavaScript, etc., the components can be customized according to actual needs, making development more convenient and greatly reducing the amount of code writing.

The component also supports hot reload. When we make changes, the page will not be refreshed, but the component itself will be reloaded immediately, without affecting the current state of the entire application. CSS also supports hot reloading.

3. Command system

Vue.js interacts with the page mainly through built-in instructions. The function of the instruction is to change certain values ​​accordingly when the value of its expression changes. Behaviors are applied to the DOM.

4. Two-way data binding

Declarative rendering is the main embodiment of two-way data binding. It is also the core of Vue.js. It allows declarative rendering of data using simple template syntax. Integrate into DOM.

5. Virtual DOM

vue.js 2.0 begins to support virtual DOM (vue.js 1.0 operates real DOM, not virtual DOM). Virtual DOM can also improve the page refresh speed.

6. State management

State management is actually a one-way data flow. State drives the rendering of View, and the user operates the View to generate Action, which causes the State to change, thereby causing the View to Re-render to form a separate component.

7. Client routing

Vue-router is the official routing plug-in of Vue.js. It is deeply integrated with Vue.js and used to build single-page applications. Vue single-page applications are based on routing and components. Routing is used to set access paths and map paths and components. Traditional pages implement page switching and jumps through hyperlinks.

Related recommendations:

2020 front-end vue interview questions summary (with answers)

vue tutorial Recommended: The latest 5 vue.js video tutorial selections in 2020

For more programming-related knowledge, please visit:Introduction to Programming! !

The above is the detailed content of What are the features of vue.js?. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!