Open mldmix opened 4 years ago
Hi
As seen on title i would like to remove dynamically images from slide, when i choose one image and remove it all images gone, i used index variable and put it in state to get current index, and just slice the item in array:
setState({ images: this.state.images.splice(i, 1) })
Try setState({ images: this.state.images.filter((_, idx) => idx !== i })
Hi
As seen on title i would like to remove dynamically images from slide, when i choose one image and remove it all images gone, i used index variable and put it in state to get current index, and just slice the item in array:
setState({ images: this.state.images.splice(i, 1) })