Home > Software engineering >  Trouble understanding why react console.log returns $$typeof: Symbol(react.element) or nothing
Trouble understanding why react console.log returns $$typeof: Symbol(react.element) or nothing

Time:04-21

I'm currently creating a way to handle file uploads using the dropzone-ui. I've managed to display the file output as text in my console on the main file where my upload is handled but I want to move the handling of the file parsing and such into another file so my upload file isn't cluttered. However when I do this I am unable to console.log my output anymore. So I'm wondering why this is and if I'm correctly passing the file. If you need any more clarification or to see anything else please let me know I would be happy to provide anything needed. I also wouldn't mind being pointed to a resource that can explain why I am getting $$typeof: Symbol(react.element) as output. Thanks for your time.

Side note if its important. I am attempting to parse through files in order to pass the data to my backend to be stored.

Current drop zone passing file

Function in separate file that is going to handle parsing and reading files

Code that displays text in console from upload file

CodePudding user response:

Overall the problem was what I expected it to be. While I did not find any useful resources for answering my question I managed to find the solution while playing around with it.

The problem was that I was trying to render the function as a component like so, when I should of called it as a simple function like CycleData().

  • Related