Image does not render on FlatList in some android devices
Try using react-native-fast-image which will cache images and renders very fast.
there can be a lot of reasons.
1- can you try to delete "removeClippedSubviews={true}
" prop.
2- maybe it's a performance problem. have you ever tried maxToRenderPerBatch prop of flatlist?
3- have you ever tried extraData prop of flatlist? you can use like this: extraData={this.state}
The problem is specific on Android pie (9)
when not using https
. In my case all the urls are http
which cause the problem.
The solution below url http
can be used
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config">
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
I fixed by replacing http
with https
details here https://github.com/facebook/react-native/issues/24720
In this case react-native-fast-image
and removeClippedSubviews
are not necessary.