Skip to content

Instantly share code, notes, and snippets.

@ecavalcanti
Created October 16, 2017 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecavalcanti/1604a118b5def7910bc265647edf3414 to your computer and use it in GitHub Desktop.
Save ecavalcanti/1604a118b5def7910bc265647edf3414 to your computer and use it in GitHub Desktop.
import { TouchableOpacity, View, FlatList, Text, Image } from 'react-native'
...
_renderItem = ({item}) => {
return (
<TouchableOpacity onPress={()=>this._onItemPress(item)} style={{flexDirection:'row', padding: 10, alignItems:'center'}}>
<Image style={{height: 50, width: 50, borderRadius: 25}} source={{uri: `${item.thumbnail.path}.${item.thumbnail.extension}` }} />
<Text style={{marginLeft: 10}}>{item.name}</Text>
</TouchableOpacity>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment