Reputation: 157
I am fairly new to react native and I am trying to render json data on the android emulator, however, I am getting an error which I have no idea about. Will appreciate any help I can get.
The json data trying to be rendered
The error shown on the emulator
Upvotes: 0
Views: 1289
Reputation: 2657
Could you replace your class code in LibraryList.js with this?
class LibraryList extends Component {
renderRow(library) {
return <ListItems library={library} />;
}
render() {
return(
<FlatList
data={this.props.libraries}
renderItem={({item}) => <Text>{item.title}</Text>}
keyExtractor={item => item.title}
/>
);
}
}
Upvotes: 1