Home  >  Article  >  Web Front-end  >  Which one is bigger, vue or react?

Which one is bigger, vue or react?

WBOY
WBOYOriginal
2022-04-29 16:12:442549browse

React is larger in size; in benchmark testing, the compressed version of react is almost twice as large as vue; react is good at handling large application projects or using JavaScript to build mobile applications, and is larger in size, while vue The use cost is lower, more flexible and smaller in size.

Which one is bigger, vue or react?

The operating environment of this tutorial: Windows 10 system, react17.0.1 version, Dell G3 computer.

Which one is bigger, vue or react

React

React advocates the concept of functional programming and achieves high-performance and efficient development of front-end interfaces. , react is very good at handling componentized pages. The official website of React mentions the key feature of "learn once, write anywhere", and you can use the React framework to build mobile applications in JavaScript. In React, all component rendering functions rely on JSX, which is a syntax extension for JavaScript that is very simple and useful when creating UI components and debugging.

Vue

Vue is a progressive JavaScript framework. "Progressive framework" and "bottom-up incremental development design" are two concepts developed by Vue. Vue can be used in any other type of project, with lower cost, more flexibility, and weaker claims. Vue projects can also be easily integrated with other technologies for development. Features: easy to use (low cost of use), flexible (complete ecosystem, suitable for projects of any size), efficient (small size, good optimization, good performance).

Which one is bigger, vue or react?

Vue core developers provided a benchmark test, which shows that Vue’s rendering system is faster than React’s. The test method is to render a list of 10,000 items 100 times.

Which one is bigger, vue or react?

From a practical point of view, this benchmark is only relevant for edge cases. This operation is not often performed in most applications, so it should not be treated as such. serves as an important point of comparison.

However, page size is relevant for all projects, and Vue is again ahead in this regard, with its current version only 25.6KB compressed.

To achieve the same functionality in React, you need React DOM (37.4KB) and React with Addon library (11.4KB), totaling 44.8KB, which is almost twice the size of Vue. Twice the size does not bring twice the functionality.

Summary

The advantages of Vue include: flexible selection of templates and rendering functions, simple syntax and project creation, faster rendering speed and smaller size; The advantages of React include: More suitable for large-scale applications and better testability, suitable for both web and native apps, more support and tools brought by a larger ecosystem.

In fact, React and Vue are both very good frameworks. They have more similarities than differences, and most of their best features are the same. If you want to reduce learning costs or integrate a front-end JavaScript framework into an existing application, Vue is a better choice. If you want to build large-scale application projects or use JavaScript to build mobile applications, React is definitely the best choice.

Recommended learning: "react video tutorial"

The above is the detailed content of Which one is bigger, vue or react?. 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