Below is part of the jquery code I have which displays the file input and a \"Clear File\" button.
var $imagefile = $(\'\').attr({
type: \
for React users
e.target.value = ""
But if the file input element is triggered by a different element (with a htmlFor attribute) - that will mean u don't have the event
So you could use a ref:
at beginning of func:
const inputRef = React.useRef();
on input element
and then on an onClick function (for example) u may write
inputRef.current.value = ""
this.inputRef = React.createRef()