Home>Article>Web Front-end> What framework does vue and react belong to?

What framework does vue and react belong to?

青灯夜游
青灯夜游 Original
2022-07-14 15:33:19 1925browse

Vue and react belong to JavaScript frameworks. 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 used to build user interfaces, mainly used to build UI; React minimizes interaction with DOM by simulating DOM.

What framework does vue and react belong to?

The operating environment of this tutorial: Windows7 system, vue3&&react18 version, Dell G3 computer.

Vue and react are both JavaScript frameworks.

vue framework

vue.js (pronounced /vjuː/, similar to view) is a set of tools for building user interfaces Progressive JavaScript framework. 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, making it easy to integrate 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 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 enable responsive data binding and composed view components through the simplest possible API.

The characteristics of Vue.js are as follows:

  • Lightweight framework (relatively speaking)

  • Two-way data binding

  • Instructions

  • Plug-in

Advantages :

  • Simple: The official documentation is very clear and easier to learn than Angular. (Domestic frameworks, demos, and documents)

  • Fast: Update DOM in asynchronous batch processing. (Concurrently)

  • Composition: Compose your application with decoupled, reusable components. (Function is composed of different single functional components)

  • Compact: ~18kb min gzip, and no dependencies.

  • Powerful: Expressions & computed properties without declaring dependencies.

  • Friendly to modules: It can be installed through NPM, Bower or Duo. It does not force all your code to follow Angular's various regulations, and the usage scenarios are more flexible.

Disadvantages:

  • Newborn: Vue.js is a new project and is not as mature as angular.

  • The impact is not very big.

  • Does not support IE8

react framework

react.js Framework is a JavaScript development framework launched by Facebook for building user interfaces.

React is a declarative, efficient and flexible JavaScript library for building user interfaces. React allows you to combine short, independent code snippets into complex UI interfaces. These code snippets are called "components".

Because the design idea of React is extremely unique, it is a revolutionary innovation, has outstanding performance, and the code logic is very simple. Therefore, more and more people are beginning to pay attention to 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 provides views of data rendered into HTML. React views are typically rendered using components that contain other components specified in custom HTML tags. React provides programmers with a model in which child components cannot directly affect outer components, efficient updates to HTML documents when data changes, and clean separation between components in modern single-page applications.

React makes creating interactive UIs a breeze. Design concise views for every state in your app so React can efficiently update and render components correctly when data changes. Component logic is written in JavaScript rather than templates, so you can easily pass data around your app and keep state separate from the DOM.

Features of React

  • Declarative design: React adopts a declarative paradigm, which makes it easy to describe applications.

  • Efficient: React minimizes interaction with the DOM by simulating the DOM.

  • Flexible: React plays well with known libraries or frameworks.

  • JSX: JSX is an extension of JavaScript syntax. JSX is not required for React development, but it is recommended.

  • Components: Building components through React makes it easier to reuse code and can be well applied in the development of large projects.

  • One-way response data flow: React implements one-way response data flow, thereby reducing duplicate code, which is why it is simpler than traditional data binding.

  • Mastering React can not only help you deal with front-end application development, but its programming ideas can also be applied to back-end development of React Native native App development and server-side rendering. So whether you are engaged in front-end development or not, learning React will be of great help to improve your skills and career development.

The difference between React and Vue

In a React application, 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 components really need to be re-rendered, and developers do not need to You 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 complete programming language JavaScript functions to build your view page; Vue has its own rendering function, and Vue also supports JSX. Vue officially recommends using templates to render views. Components are divided into logical components and presentation components.

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

Vue’s routing library and state management library are officially maintained and supported and updated synchronously with the core library. React chooses to leave these issues to the community, thus creating a more decentralized ecosystem.

[Related recommendations:Redis video tutorial]

The above is the detailed content of What framework does vue and react belong to?. 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