i have image array in Flatlist like this:
a = ['image1','image2','image3']
i have index of array and i want to remove image2, it removed image1 and image3
when i remove image1 and it removed image2 and image3
remove image3 => remove image1 and image2
code I wrote
delete = index => {
console.log(index);
this.setState({ image: this.state.image.splice(index, 1) })
}
Why is it like that?