Home >Web Front-end >Front-end Q&A >What are the disadvantages of react components
Disadvantages of react components: 1. React itself is just a V, not a complete framework; 2. ReactRouter and Flux need to be added to write large applications.
The operating environment of this article: Windows7 system, react17.0.1, Dell G3.
What are the disadvantages of react components?
Disadvantages
1. React itself is just a V, not a complete framework, so if it is a large project and you want a complete framework If so, you basically need to add ReactRouter and Flux to write large-scale applications.
2. Most of the pitfalls have not been stepped out. . . . .
It’s probably because it’s still too new now and it’s hard to say whether there will be any major API changes in the future. Currently, React is used in large and stable projects, and I only know about Yahoo’s Email.
So there are very few voices criticizing React. Maybe it’s not that it really doesn’t have pitfalls, but that those pitfalls haven’t been stepped out yet.
More advantages:
1. React is very fast: it does not directly operate on the DOM, but introduces a concept called virtual DOM, which is installed in javascript Between the logic and the actual DOM, the performance is good.
2. Cross-browser compatibility: Virtual DOM helps us solve cross-browser problems. It provides us with a standardized API, which is no problem even in IE8.
3. Everything is component: the code is more modular, it is easier to reuse the code, and the maintainability is high.
4. One-way data flow: Flux is an architecture for creating a one-way data layer in JavaScript applications. It was conceptualized by Facebook with the development of the React view library.
Recommended learning: "react video tutorial"
5. Isomorphic, pure javascript: Because the search engine crawler program relies on server-side responses rather than JavaScript The execution of pre-rendering your app helps with SEO.
6. Good compatibility: For example, use RequireJS for loading and packaging, while Browserify and Webpack are suitable for building large applications. They make those difficult tasks less daunting.
The above is the detailed content of What are the disadvantages of react components. For more information, please follow other related articles on the PHP Chinese website!