react-image-preview-tutorial
react-image-preview-tutorial copied to clipboard
There is an error
when you upload the first time. it's good but the second time it's showing an error
add this file.target.files.length === 1 && reader.readAsDataURL(file.target.files[0]) after
I think it just clears off the setstate. You can set if and else condition to avoid it according to your requirement.
anyway, your repo helps me to create my component.