哲学
- 思想
- 组件化
- 单向数据流
- 心智模型/概念
- 关注点分离
- 横切关注点(cross-cutting concerns)
- 复用逻辑/状态逻辑复用
- UI = fn(state)
- 设计理念/原则
- 组合 优于 继承
关注点分离
(只是,从不同的角度来看)
命令式UI 和 声明式UI
命令式 UI 编程:
声明式 UI 编程:
参考
- https://zh-hans.react.dev/learn/thinking-in-react
- https://zh-hans.legacy.reactjs.org/docs/composition-vs-inheritance.html
- https://zh-hans.legacy.reactjs.org/docs/faq-structure.html
- https://zh-hans.legacy.reactjs.org/docs/design-principles.html
- https://zh-hans.legacy.reactjs.org/docs/glossary.html
- https://zh-hans.legacy.reactjs.org/docs/design-principles.html#composition
- https://zh-hans.legacy.reactjs.org/docs/composition-vs-inheritance.html#gatsby-focus-wrapper