I have an input type="file" and an input type="text". When I choose the file first and then put text in the input box and click the Add button, the picture doesn't show but when I put the text first and then choose the picture (file), it behaves normally.I think there's some problem in the inputKey That I have given. Here's a link from where I found this method
http://robhoffmann.me/2016/03/12/Clearing-a-file-input-in-React/
What I am trying to do: I want to be …