Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74735

How to set a File in a React state

$
0
0

I'm currently using the React FilePicker tool which requires a "handFileChange" method. In that method, I'm trying to set my a file variable in my react state to the file that's used as a parameter for the method.

I'm trying to also implement a getter method that will return the current file. However, when I go to console.log the file from the getter method, I get a blank line

Any suggestions? Thanks

enter image description here

enter image description here

enter image description here


Viewing all articles
Browse latest Browse all 74735

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>