- React Components
- Christopher Pitt
- 169字
- 2021-07-09 19:34:44
Why components?
Component-based design is powerful, especially when we use immutable data and unidirectional data flow. It forces me to stop thinking about how different technologies or tools interact. It gets me thinking about the single most important function of each interface element.
When we start building an application, it's tempting to think of every piece as part of the whole. All interface elements blend into the same big picture, until it becomes so big that separating parts of it out seems impossible.
Imagine you had to build a space ship. What a huge task! You'd need some rocket boosters, a couple of wings, life support, and so on. Now consider how you would approach it if one of the constraints was that each moving part of the space ship would need to be inpidually tested.
Testing is the great pide between designing systems as a whole and designing systems as large collections of small pieces. Component-based design is fantastic because it makes sure that every part is testable.
- Microsoft Application Virtualization Cookbook
- JavaScript 網(wǎng)頁(yè)編程從入門(mén)到精通 (清華社"視頻大講堂"大系·網(wǎng)絡(luò)開(kāi)發(fā)視頻大講堂)
- PowerCLI Cookbook
- 實(shí)用防銹油配方與制備200例
- C/C++常用算法手冊(cè)(第3版)
- C語(yǔ)言程序設(shè)計(jì)立體化案例教程
- Python面向?qū)ο缶幊蹋簶?gòu)建游戲和GUI
- Kotlin從基礎(chǔ)到實(shí)戰(zhàn)
- 零基礎(chǔ)Java學(xué)習(xí)筆記
- Unity 2017 Mobile Game Development
- Learning Apache Karaf
- 零基礎(chǔ)學(xué)Kotlin之Android項(xiàng)目開(kāi)發(fā)實(shí)戰(zhàn)
- Spring Boot+MVC實(shí)戰(zhàn)指南
- Node.js區(qū)塊鏈開(kāi)發(fā)
- Go語(yǔ)言入門(mén)經(jīng)典