Perf Tips
基本准则
在
shouldComponentUpdate中避免不必要的检查.使用不可变数据类型(Immutable).
编写针对产品环境的打包配置(Production Build).
通过Chrome Timeline来记录组件所耗费的资源.
在
componentWillMount或者componentDidMount里面通过setTimeOut或者requestAnimationFram来延迟执行那些需要大量计算的任务.
相关文章
Performance Engineering with React