I have an array of image uri's which are presented in the UI as follows:
{this.state.ADImageArray.map((prop, key) => {
return (
<View style={PhotoStyles.imgThumbnailBlock}>
<Image
source={{uri: prop, isStatic: true}}
style={PhotoStyles.imgThumbnail}
/>
<TouchableOpacity onPress={this.removephoto} style={PhotoStyles.removePhotoLnk}>
<Image
source={require('../images/icons/ico-removeImg.png')}
style={PhotoStyles.removePhotoImg}
/>
</TouchableOpacity>
</View>
);
})}
I want an image to be removed from the array whenever the orange delete button is clicked.
I have the this.removephoto action ready - but wonder how can i remove a particular image in this context - is it possible to remove the image by key?
