Home>Article>Web Front-end> Is vue.js based on javascript?

Is vue.js based on javascript?

青灯夜游
青灯夜游 Original
2020-12-11 16:17:20 3637browse

vue.js is a progressive framework based on JavaScript, used to build user interfaces, and adopts the MIT open source license. Vue's core library only focuses on the view layer and adopts a bottom-up incremental development design. It is very easy to learn and integrate with other libraries or existing projects.

Is vue.js based on javascript?

The operating environment of this article: windows10 system, vue 2.9, thinkpad t480 computer.

Vue.js is a progressive JavaScript framework for building user interfaces. Vue only focuses on the view layer and adopts a bottom-up incremental development design. Related recommendations: "vue.js Tutorial"

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 composed view components through the simplest possible API

Vue.js itself is not a comprehensive framework - it only focuses on views layer. Therefore it is very easy to learn and very easy to integrate with other libraries or existing projects. On the other hand, Vue.js is also perfectly capable of powering complex single-page applications when used with related tools and supporting libraries.

The main features of Vue.js

Vue.js is an excellent JavaScript library for front-end interface development. It is very popular because it has many outstanding features. , the main features are as follows.

1) Lightweight framework

Vue.js can automatically track dependent template expressions and calculated properties, provides MVVM data binding and a composable component system, with simple, The flexible API makes it easier for readers to understand and get started faster.

2) Two-way data binding

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

3) Instructions

Vue.js interacts with the page, mainly through built-in instructions. The function of the instruction is to change certain behaviors accordingly when the value of its expression changes. Applied to the DOM.

4) 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.

5) Client-side 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.

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.

Related recommendations:

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

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

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

The above is the detailed content of Is vue.js based on javascript?. 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:What is vue.resource Next article:What is vue.resource