File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 15157 . [ D7:解构赋值(Destructuring assignment)(2016-8-26)] ( #d7解构赋值destructuring-assignment2016-8-26 )
16168 . [ D8: React-Native 原生模块调用(iOS) (2016-8-29)] ( #d8react-native-原生模块调用ios-2016-8-29 )
17179 . [ D9:动态属性名&字符串模板(2016-8-30)] ( #d9动态属性名字符串模板2016-8-30 )
18+ 10 . [ D10:优化切换动画卡顿的问题(2016-8-31)] ( #d10优化切换动画卡顿的问题2016-8-31 )
1819```
1920模板:
2021D1:标题 (日期)
@@ -26,7 +27,20 @@ D1:标题 (日期)
2627内容
2728另外:记得在列表中添加链接
2829```
29-
30+ D10:优化切换动画卡顿的问题(2016-8-31)
31+ ------
32+ 使用API InteractionManager,它的作用就是可以使本来JS的一些操作在动画完成之后执行,这样就可确保动画的流程性。当然这是在延迟执行为代价上来获得帧数的提高。
33+ ``` javascript
34+ InteractionManager .runAfterInteractions (()=> {
35+ // ...耗时较长的同步任务...
36+ // 更新state也需要时间
37+ this .setState ({
38+ ...
39+ })
40+ // 获取某些数据,需要长时间等待
41+ this .fetchData (arguements)
42+ })
43+ ```
3044D9:动态属性名&字符串模板(2016-8-30)
3145------
3246在 ES6+ 中,我们不仅可以在对象字面量属性的定义中使用表达式,还有使用使用字符串模板:
You can’t perform that action at this time.
0 commit comments