
react-native
实践是最好的老师
2017七月份毕业于南昌航空大学,在深圳从事web前端
展开
-
Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly call
遇到情景使用了mobx使用了react-native-snap-carouselrenderItem(){let { data = [] } = res;增添下面语句就解决了data = Array.from(data);}原创 2021-10-12 09:52:24 · 344 阅读 · 0 评论 -
react-native因手机设置字体变大而换行解决方法
在使用Text标签时加上allowFontScaling={false}属性原创 2021-10-22 10:25:36 · 642 阅读 · 0 评论 -
react-native 滑动flatlist触发子元素的点击事件解决方法
The optimal solution to disable onPress Event of a child component, while the parent view(scrollView, VirtualizedList, LargeList, SpringScrollView) is moving is to simply addonMoveShouldSetResponderCapture={() => { return true; }}to the parent view. T原创 2021-12-10 09:19:46 · 911 阅读 · 0 评论 -
react-native FlatList不能滚动
FlatList的父容器需加style={{ flex: 1 }} <View style={{ flex: 1 }}> <FlatList showsVerticalScrollIndicator={false} data={allShortVideo} keyExtractor={item => item._id.toString()} renderItem={this.r原创 2021-12-28 17:23:44 · 1482 阅读 · 0 评论