当然不是咖啡!
![](https://box.kancloud.cn/2015-11-20_564e9933620f7.gif)
##12.1 [react profile](https://facebook.github.io/react/docs/perf.html)
## 12.2 PureRenderMixin
当你的 props 和 state 都是 immutable 的时候…
~~~
var PureRenderMixin = require('react-addons-pure-render-mixin');
React.createClass({
mixins: [PureRenderMixin],
render: function() {
return <div className={this.props.className}>foo</div>;
}
});
~~~
## 12.3 [shouldComponentUpdate](https://facebook.github.io/react/docs/advanced-performance.html#shouldcomponentupdate-in-action)
可以通过这个方法对于 component 到底什么情况下应该重新 render 调优
> 所有图片来源于 giphy.com, copyright @[Futurama](http://www.cc.com/shows/futurama)
> Author: Jichao Ouyang
> Modified: 2015-11-16 Mon 00:39
> Generated by: [Emacs](http://www.gnu.org/software/emacs/) 24.5.1 ([Org](http://orgmode.org/) mode 8.3.2)
> with _(:з」∠)_ by [OrgPress](https://github.com/jcouyang/orgpress)
- 1. Why not 2 way binding/为毛不用双向绑定
- 2. What's Virtual DOM, why should we care / 为毛要用 Vitual Dom
- 3. Why Immutable / 为毛要不可变
- 4. How to do Unit test React project / 如何单元测试
- 5. Modular and Components
- 6. How should I thinking in react way / 如何以 React 的方式解决问题
- 7. What about Data Fetching / 只有 V 的话,数据 M 呢
- 8. What about Router / router 怎么办
- 9. How to communicate between two components that don't have a parent-child relationship/ 不是父子关系的 component 怎么交互
- 10. When should I use "key" / 什么时候该用 key
- 11. What's these Warnings / 这些黄黄的是神马
- 12. How to Profile Component Perfomance / 如何提升效率