I was trying to implement a real time filtering using textInput. However, the re-rendering of the ListView is incredibly slow (about 1 seconds after finish typing).
This is what the renderRow function returns: (I simplified it a lot from my real renderRow, still slow)
<View>
<TouchableOpacity onPress={this.props.onSelect}>
<View style={cellstyle}>
<Image
source={require('image!logo')}
style={[
styles.cellImage,
{resizeMode: Image.resizeMode.contain}
]}
/>
<View style={styles.textContainer}>
<Text numberOfLines={2} lineHeight={1}>
{this.props.item.name.trim()}
</Text>
<Text>
{digits(this.props.item.price)}
</Text>
</View>
</View>
</TouchableOpacity>
<View style={styles.cellBorder} />
</View>
I have tried to replace TouchableOpacity with View, but that still doesn't help improve the performance much.
I was trying to implement a real time filtering using textInput. However, the re-rendering of the ListView is incredibly slow (about 1 seconds after finish typing).
This is what the renderRow function returns: (I simplified it a lot from my real renderRow, still slow)
I have tried to replace TouchableOpacity with View, but that still doesn't help improve the performance much.