why React?
React is a JS library developed by Facebook. So why did Facebook build React? What problems was it mainly intended to solve, and how was it solved?
Starting from these questions, I searched online and found this explanation.
Facebook believes that MVC cannot meet their expansion needs. Due to their very large code base and large organization, MVC quickly becomes very complex every time a new function or feature needs to be added. , the complexity of the system grew exponentially, causing the code to become brittle and unpredictable, and as a result, their MVC was falling apart. It is believed that MVC is not suitable for large-scale applications. When there are many models and corresponding views in the system, its complexity will expand rapidly and it will be very difficult to understand and debug, especially the possible two-way data flow between models and views.
Solving this problem requires "organizing the code in some way to make it more predictable", which has been done through their (Facebook) proposed Flux and React.
Flux is a system architecture used to promote the one-way flow of data in applications. React is a JavaScript framework for building "predictable" and "declarative" Web user interfaces. It has enabled Facebook to develop Web applications faster
react is currently the most popular js MVC framework , write a react series blog, and recall the basic knowledge of react. New front-end novices can continue to pay attention. I will teach you to develop a complete project with react from scratch, and will also involve webpack, node, etc. Front-end knowledge will be updated every day. This series of react blogs will cover all the current knowledge points of react:
1. React basics
1. React virtual DOM concept, React’s performance-efficient core algorithm
2.React components, understand what componentization is
3.React component nesting
4.JSX built-in expressions
5.React life cycle
2. React Properties and events
1.State property, controls everything in React
2.Props property
3. Two-way binding of events and data, including parameter transfer between parent and child pages
4. Reusable components really make React development fast. Efficient places
5. Component Refs
6. Independent components share Mixins
3. React style
1. Inline style
2. Expressions in linked styles
3. CSS modularization, learn how to use require to reference styles
4. Interconversion between JSX styles and CSS
5. A very easy-to-use style framework Ant Desgin style Framework introduction
6. The use of Ant Desgin style framework
4. React Router
Router concept Router parameter transfer
react Development: Facebook develops its own internal website Instagram, a JavaScript MVC framework developed by its own team and open sourced in May 2013.
React is mainly used to build UI, render UI, and build interactive application components. Later, react Native was released, using webapp instead of native development. One UI, run in multiple places.
The above is the detailed content of The most popular js MVC framework--react. For more information, please follow other related articles on the PHP Chinese website!