-
-
Save amandeepmittal/5ca897d0eee9ab70986faa4ce43c283c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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