react native 踩坑记录

2020-11-24  本文已影响0人  _若无
将keyExtractor = (item, index) => index转为keyExtractor = {(item, index) => index.toString()}
image.png
用ImageBackground 代替 Image

-问题:
Text strings must be rendered within a <Text> component.
原因:是因为多了两个‘’


image.png

解决办法:
去掉就可以了!!坑啊


image.png

解决办法:

去掉黄色警告:
在index.js 添加
console.ignoredYellowBox = ['Warning: BackAndroid is deprecated. Please use BackHandler instead.','source.uri should not be an empty string','Invalid props.style key'];
console.disableYellowBox = true // 关闭全部黄色警告
上一篇下一篇

猜你喜欢

热点阅读