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

Chapter 1. Thinking in Components

React was the first interface library that got me thinking about component-based design. React promotes many good patterns and habits, but this one stands out for me. To understand why, we need to think about how React works under the hood. React is primarily a rendering engine. It was created (and is used) for generating user interfaces.

How interfaces used to work (and indeed still work apart from React) was that someone would come up with a design. That image file would then be split up into assets for each interactive part of the interface. A library such as jQuery would manage user interactions and connect different interface components, often with an assortment of plugins.

Inpidual interface components can be quite clean and complete inpidually. However, when they are combined, interactions between components and shared, mutable component state often make a messy codebase. One of the main reasons why React was created was to simplify the interactions between components, so they can remain clean and easy to understand.

主站蜘蛛池模板: 仙游县| 嘉荫县| 崇明县| 扶余县| 新野县| 华阴市| 赞皇县| 广平县| 灵石县| 任丘市| 南投县| 台江县| 渝北区| 镇平县| 扶余县| 呈贡县| 安龙县| 宝兴县| 光泽县| 密山市| 屏东市| 芦山县| 凌源市| 民权县| 九寨沟县| 祁连县| 瑞昌市| 老河口市| 商洛市| 得荣县| 若尔盖县| 普兰县| 静海县| 南安市| 太湖县| 宁德市| 牡丹江市| 东山县| 荃湾区| 库伦旗| 根河市|