0%

React-Native ListView性能

优化方案

1.使用react-native-sglistview、react-native-gifted-listview
2.设置removeClippedSubviews 为true,子类需要添加样式overflow:’hidden’
3.设置拖动速率 decelerationRate
4.dataSource里的数组个数做限制,做分页处理,10~15一页
5.在sholudComponentUpdate处理,确保不要重复刷新
6.上拉下拉刷新操作,加载过程中隐藏listview,显示加载界面

Read more »

###1. CSS text-decoration 属性
none 默认。定义标准的文本。
underline 定义文本下的一条线。
overline 定义文本上的一条线。
line-through 定义穿过文本下的一条线。
blink 定义闪烁的文本。
inherit 规定应该从父元素继承 text-decoration 属性的值。

Read more »

1.定义

A higher-order component is a function that takes a component and returns a new component.

Read more »

在Mac上使用apche2

1.基本命令

Mac上自带apache2,它的安装目录是/etc/apach2, 文档目录在/Library/WebServer/Documents/

1
2
3
4
5
6
#启动apche2 由于80端口需要管理者权限
sudo apachectl start
#关闭
sudo apachectl stop
#重启
sudo apachectl restart
Read more »

1. Image overflow

Image是可以overflow:display,这个在android和ios都有效果。而View在android上不可以overflow:display的。

Read more »