Open Jason-CKY opened 2 years ago
I am having the same problem.
Same
after spending a couple of hours. I managed to solve this Issue.
all you need to update your state while uploading is running. the state can be anything.
ex::
const [isUpdatePreview, setIsUpdatePreview] = useState(false)
<Dropzone getUploadParams={getUploadParams} classNames={{ inputLabelWithFiles: defaultClassNames.inputLabel }} onChangeStatus={handleChangeStatus} />
now you need to update your state to tell react it does update the virtual DOM
const handleChangeStatus = ({ meta }, status) => {
setIsUpdatePreview(!isUpdatePreview)
}
it will fix your Issue
well, this works good
Hey @aliMurtaja, Your answer work for me as well. Just one thing, I am not able to remove the dropzone label after uploading files.
@aliMurtaja thank you so much, it worked well !
As mentioned in the title, it does not render preview and submit button when i run the code on React.StrictMode