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

Summary

It is important to understand the many moving pieces involved in building React projects, as each one lends itself well to the context and decisions made when building React. Understanding the historical context helps frame the questions around why implementing some things in React is the way it is. In addition, understanding how to use the Create React App framework helps you get moving faster and building new projects with less fuss and effort, making it a critical part of your development workflow.

We also now have a strong understanding of the basic building blocks of any React component, regardless of the level of complexity. We can define small, lightweight components using functional syntax, which is a very common idiom in modern React development. We can also define larger, stateful components using class syntax, which also helps us plan for and architect our more complicated React components in ways that are easy to develop on, maintain, and support over the long term.

Ultimately, the hardest part is just knowing when to use one or the other, and that decision just boils down to if you need helper functions or state. If so, you should probably use a class-based component and not a functional component, otherwise, use the lighter components. In the next chapter, we will build upon this base layer in much greater detail, creating a strong foundation on which we will build some very complex React projects from start to finish on top of the knowledge that you have gained here.

主站蜘蛛池模板: 淅川县| 海丰县| 绥滨县| 汨罗市| 贵溪市| 汪清县| 胶南市| 平阳县| 依安县| 丰台区| 泸定县| 呼伦贝尔市| 宿松县| 辉南县| 宣化县| 武功县| 沛县| 漳浦县| 高台县| 华安县| 揭东县| 彰化市| 政和县| 加查县| 上饶市| 贺州市| 阜新| 温州市| 汤原县| 宿迁市| 婺源县| 北宁市| 自贡市| 巩留县| 呼图壁县| 深水埗区| 博湖县| 五家渠市| 荣昌县| 清新县| 枣强县|