Category "dropzone"

how to remove or delete selected file from React-Dropzone

I have the following code and I am trying to remove or delete a selected file when the x button is press. Currently I am able to upload a image by drag and drop

Dropzone js: Add previewElements index number as id

Is there a way to use the index number of preview element within the template code so I can add sequential id's(id="item-[1,2,3]") to each time the template is