摘要: 转载自:https://www.jianshu.com/p/0fa8c7456c15 Immutable Data 就是一旦创建,就不能再被更改的数据。对 Immutable 对象的任何修改或添加删除操作都会返回一个新的 Immutable 对象。Immutable 实现的原理是 Persisten 阅读全文
posted @ 2020-05-13 17:08 红苹果学园 阅读(170) 评论(0) 推荐(0) 编辑
摘要: generator 算是中间的一个过渡版,但是也有其独有的东西。转载自:https://www.jianshu.com/p/c94edc0057fe generator可以简化异步的编码,减少嵌套,而async、await组合起来使用,可以更进一步 next方法的作用是分阶段执行Generator函 阅读全文
posted @ 2020-05-13 15:15 红苹果学园 阅读(877) 评论(0) 推荐(0) 编辑
摘要: 使用方法看起来一样: componentWillReceiveProps(nextProps) { if(nextProps.count !== this.props.count) // doSomething } } componentDidUpdate(prevProps) { if(prevP 阅读全文
posted @ 2020-05-13 13:42 红苹果学园 阅读(1070) 评论(0) 推荐(0) 编辑