Home  >  Article  >  Web Front-end  >  What is React

What is React

清浅
清浅Original
2018-12-05 11:36:396780browse


React is a JavaScript library used to build user interfaces. It has good flexibility and scalability and is suitable for building large front-end projects

React is a JavaScript library used to build user interfaces. It is the view layer of web applications. Next, in the article, we will introduce in detail what React is

[Recommended courses:React tutorial

What is React

##React meaning

React is a JavaScript framework, and at the core of all React applications are components. A component is a self-contained module that can render some output. Components are composable. A component may contain one or more other components in its output.

In fact, to write a React application is to write React components corresponding to various interface elements, and then organize these components in higher-level components, which define the structure of the application

It is important that every component in a React application follows strict data management principles. Complex interactive user interfaces often involve complex data and application state. The surface area of ​​React is limited and the purpose is to give us the tools to be able to predict how our application will look in a given situation.

Usage of React

<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
ReactDOM.render(
	<h1>这是我的第一个React程序</h1>,
	document.getElementById(&#39;example&#39;)
);
</script>

</body>
</html>

Rendering:

What is React

Advantages and disadvantages of React

Advantages of React:

(1) It provides maximum flexibility and responsiveness.

(2) Since it is based on the Document Object Model, it allows browser-friendly arrangement of documents in HTML, XHTML or XML format.

(3) Has a rich JavaScript library

(4) Has very good flexible structure and scalability

(5) React provides the React Native platform, Natively rendered apps can be developed for iOS and Android through the same React component model.

Disadvantages of React.js:

Steep learning curve: It requires in-depth knowledge to build applications due to the complex setup process, properties, functions, and structure.

What is React

Summary: The above is the entire content of this article, I hope it will be helpful to everyone's study.


The above is the detailed content of What is 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
Previous article:what is bootstrapNext article:what is bootstrap