Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal amandeepmittal/block32.js Secret

Created Feb 18, 2020
Embed
What would you like to do?
{
listItems.length !== 0 ? (
<FlatList
data={listItems}
keyExtractor={item => item.id.toString()}
renderItem={({ item }) => (
<View style={styles.listItemContainer}>
<View style={styles.listItemMetaContainer}>
<Text style={styles.itemTitle} numberOfLines={1}>
{item.name}
</Text>
</View>
</View>
)}
/>
) : (
<Text style={{ fontSize: 30 }}>You list is empty :'(</Text>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.