官术网_书友最值得收藏!

Introduction

In React, code is written in the form of entities called components that help us organize code modularly. This modular structure allows apps to be scalable and maintainable. React.js, as a JavaScript library, has achieved a lot of popularity in the web domain and has rightly been enjoying this success because it allows developers to build scalable apps rapidly while employing industry best practices.

In the previous chapters, we have largely worked with a specific type of component in React called class components. When the React framework emerged in the scene, the use of class-based components increased. During the early days of React, even before classes were available to us in JavaScript (ES6), React implemented its own take on classes with React.createClass. However, starting with React 0.14.0, ES6 component classes extended React.Component. And so, components can now be defined as Class components that use JavaScript classes to extend React.Component and Function components that are written as JavaScript functions. React works with React DOM, which renders these components in a chosen root element in the HTML DOM to render the React app. Let's start with the structure of React components.

主站蜘蛛池模板: 财经| 华坪县| 钦州市| 靖边县| 湾仔区| 石河子市| 渑池县| 丹东市| 甘谷县| 当阳市| 徐水县| 锦屏县| 印江| 宁德市| 康乐县| 舟山市| 增城市| 金昌市| 淮南市| 余干县| 澄江县| 佛坪县| 岳普湖县| 阜城县| 东至县| 潞城市| 襄垣县| 高雄市| 汤原县| 青阳县| 河北区| 文化| 临沧市| 常宁市| 大庆市| 凉城县| 东港市| 志丹县| 秭归县| 正镶白旗| 盐源县|