As part of a FlatList
, I render each ListItem
(from the react-native-elements
library) where I try to display an avatar (icon) from a url to a photo:
<ListItem
avatar={{ source: { uri: item.icon } }}
/>
All the other props display fine but on the left side of each cell I just get a grey box. I've logged the value of item.icon
and it points to a valid photo. Do I need to download the photo and then provide a local link to it?
How can I get the photo to show up as the cell's avatar?
react-native-elements
– Seepavatar={{ uri: item.icon }}
– Collisionavatar
andleftAvatar
? – SeepleftAvatar
is in beta version andavatar
is in stable version as per the docs. – Collision