在react原生中,当我使用Image组件时,我有很多图片要显示。
<Image source={{ uri: 'https://img.google.com/1.jpg' }} />
<Image source={{ uri: 'https://img.google.com/2.jpg' }} />
<Image source={{ uri: 'https://img.google.com/3.jpg' }} />
........非常流畅
但是当加载本地缓存文件时
<Image source={{ uri: '/Users/Username/../1.jpg' }} />
<Image source={{ uri: '/Users/Username/../2.jpg' }} />
<Image source={{ uri: '/Users/Username/../3.jpg' }} />
........手机会变得非常慢,尤其是IOS,甚至崩溃
导致我无法使用模块react-native-cached-image和react-native-img-cache
我试着用react-native-fast-image替换Image,但它只是稍微好一点。
我该怎么办?帮帮我
发布于 2018-12-20 19:20:41
ScrollView添加removeClippedSubviews={true}修复它
https://stackoverflow.com/questions/53537307
复制相似问题