What is the framework of vue and react?

Vue is a progressive JavaScript framework for building user interfaces. 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 development framework for building user interfaces, mainly for building UI.



Related recommendations: "React video tutorial", "vue.js tutorial"

What is vue framework?

vue.js (pronounced/vjuː/, similar to view) is a progressive JavaScript framework for building user interfaces. Unlike other large frameworks, Vue is designed to be applied layer by layer from the bottom up. Vue's core library only focuses on the view layer, which facilitates integration with third-party libraries or existing projects.

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 very easy to integrate with other libraries or existing projects. On the other hand, Vue is fully capable of driving complex single-page applications developed with single-file components and libraries supported by the Vue ecosystem.

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

Compatibility of

Vue Vue.js does not support IE8 and below, because Vue.js uses ECMAScript 5 features that IE8 cannot emulate. Vue.js supports all ECMAScript 5 compatible browsers.

What framework is react?

The react.js framework is a JavaScript development framework launched by Facebook to build user interfaces.

React is a declarative, efficient and flexible JavaScript library for building user interfaces. Using React, you can combine some short, independent code fragments into a complex UI interface. These code fragments are called "components."

Because React's design philosophy is extremely unique, it is a revolutionary innovation, with outstanding performance, but the code logic is very simple. Therefore, more and more people begin to pay attention and use it, thinking that it may be the mainstream tool for Web development in the future.

React is an open source JavaScript library that renders data as HTML views. React views are usually rendered using components that contain other components specified in custom HTML tags. React provides programmers with a model in which seed components cannot directly affect outer components, effective updates to HTML documents when data changes, and a clean separation between components in modern single-page applications.

React makes it easy to create interactive UIs. Design a concise view for each state of your application. React can effectively update and render components correctly when the data changes. Component logic is written in JavaScript instead of templates, so you can easily pass data in the application and separate the state from the DOM.

React vs. Vue

Similarities:

Both vue and react are JavaScript UI frameworks, focusing on creating front-end rich applications. Different from the "full-featured" early JavaScript frameworks, Reat and Vue only have the skeleton of the framework, and other functions such as routing and state management are components of the framework's separation.

Both are JavaScript libraries used to create UI;

both are fast and light;

both have a component-based architecture;

both use virtual DOM; both

can be placed in a single HTML file or become a module in a more complex webpack setup;

Both have independent but commonly used routers and state management libraries;

differences:

In React applications, when the state of a component changes, it will re-render the entire component subtree with that component as the root. If you want to avoid unnecessary re-rendering of sub-components, you need to implement it manually; in Vue applications, component dependencies are automatically tracked during the rendering process, so the system can accurately know which component does need to be re-rendered. Developers do not Need to consider whether the component needs to be re-rendered and other optimizations.

In React, everything is JavaScript, and the rendering functions of all components rely on JSX. JSX is a syntactic sugar for writing JavaScript using XML syntax. You can use the full programming language JavaScript function to build your view page; Vue has its own rendering function, Vue also supports JSX, Vue officially recommends using template rendering view. Components are divided into logical components and presentation components.

CSS within the scope of the component. CSS scope is implemented in React through the CSS-in-JS solution; in Vue, it is implemented by adding scoped tags to style tags.

Vue's routing library and state management library are both supported by official maintenance and updated synchronously with the core library. React chose to leave these issues to the community for maintenance, thus creating a more decentralized ecosystem.

Related recommendation:

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

vue tutorial recommendation: 2020 latest 5 vue.js video tutorial selection

Guess you like

Origin blog.csdn.net/ny18002122997/article/details/112567356