I'm new to React Native and I wanted to make a simple app using Marvel API and for that I'm using API wrapper. I want to display infinite scroll view using VirtualizedList. And here is the question: what to pass in renderItem and data components? And is the 'findCharacters' const good written or should i change something? And lastly, should I change VirtualizedList to FlatList or ScrollView? My code is below
const findCharacters = marvel.characters.findAll()
.then(console.log)
.fail(console.error)
.done();
return (
<View style={styles.container}>
<VirtualizedList
data={/* what to pass here? */}
renderItem={/* what to pass here? */} />
</View>
);
}