-
## 需求背景
- 保持应用对状态管理处理方式的一致性(如果愿意整个应用都可以使用**声明式模型**来表达状态);
- 避免复杂组件单文件代码复杂度过高,更好的支持逻辑和 View 的分离;
- 互转模式下的 API 对齐。
## 方案
在组件的目录下添加 `model.ts` 文件,在该文件中声明状态,处理逻辑。
对应的组件粒度有:全局组件、布局内的子组件、页面内的子组件…
-
**Do you want to request a *feature* or report a *bug*?**
feature
**What is the current behavior?**
If the current behavior is a bug, please provide the steps to reproduce and if possible a m…
-
## 需求背景
React 的组件化开发特性给前端开发带来了新的开发体验,我们可以将一个页面分解成很多个组件,最后通过组件进行拼装组成完整的 UI 界面,以及组件可以很方便的在不同页面不同项目进行复用。
但是,随着业务功能复杂度的提高,组件大多数时候会和业务逻辑,生命周期函数等耦合到一起,导致很多重复的业务逻辑代码很难被抽离出来,为了快速开发很多时候我们经常是一把梭哈的复制粘贴,当业务…
-
_From [mehdi.adda](https://code.google.com/u/118323160840571009511/) on September 15, 2010 17:07:50_
What steps will reproduce the problem? 1. gem install passenger --pre
2. passenger-install-apache2…