V4.0.0
Migrate to Flatlist
Breaking Change:
with the migration the signature for renderItem function changed from:
//Before
renderItem: (item) => React.Node
//Now
renderItem: ({item, index}) => React.Node
renderItem={(item) => (
<TouchableOpacity onPress={() => this.setState({ query: item })}>
<Text>{item}</Text>
</TouchableOpacity>
)}
to:
renderItem={({ item, i }) => (
<TouchableOpacity onPress={() => this.setState({ query: item })}>
<Text>{item}</Text>
</TouchableOpacity>
)}