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

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.

主站蜘蛛池模板: 盱眙县| 绥芬河市| 英吉沙县| 镇平县| 攀枝花市| 汤阴县| 香格里拉县| 修水县| 招远市| 溧水县| 沐川县| 仁布县| 江达县| 广南县| 清原| 庄浪县| 永平县| 新安县| 滕州市| 乐清市| 南投县| 开远市| 保靖县| 岳池县| 海安县| 腾冲县| 广安市| 张家口市| 财经| 嘉祥县| 肇东市| 乌兰浩特市| 旅游| 晋宁县| 南涧| 富阳市| 贡觉县| 肇源县| 烟台市| 沙坪坝区| 通州区|