摘要: 容器型组件(container component) 含有抽象数据而没有业务逻辑的组件 负责管理数据和业务逻辑,不负责 UI 的呈现 带有内部状态 展示型组件(presentational component) 只负责 UI 的呈现 没有状态(即不使用this.state这个变量),一般可以写成无状 阅读全文
posted @ 2017-12-12 19:14 HelloHello233 阅读(447) 评论(0) 推荐(0)
摘要: https://facebook.github.io/flux/docs/dispatcher.html#content 首先安装 Dispatcher dispatcher 和 订阅发布模式(pub-sub systems)有两个不同点: 例子 演示第一个不同点: 运行结果: 可见注册的所有回调函 阅读全文
posted @ 2017-12-12 16:05 HelloHello233 阅读(307) 评论(0) 推荐(0)