When I use it works fine. But when I try to use , nothing appears.
That's my code:
export default props => { //console.warn(Object.keys(props)) function getUserItem({item: user}) { console.warn(user.name) return ( <ListItem leftAvatar={{source: {uri: user.avatarUrl}}} key={user.id} title={user.name} /> ) } return ( <View> <FlatList keyExtractor={user=>user.id.toString()} data={users} renderItem={getUserItem} /> </View> ) }
Can anybody helps me? Thank you!!!
Use this way
<View style={{flex:1}}> ... </View> const getUserItem = ({item: user}) => { ... }
2.1m questions
2.1m answers
60 comments
57.0k users