Hi fellow coders.
Today I have messed up again while creating a new component to add onto my react project.
Me and my teammate both went through each lines of code to make sure my logic makes sense. It wasn't until he told me to look in my console tab (after inspecting the page).
It was all mumbo jumbo until I read one line,
Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/static/media/CommentForm.822d12a9fce48c39b3fb') is not a valid name.
Hmmm.... so the DOM wasn't even being created and/or being mounted onto the mother component (App.js)?
Me having no idea what this means decided to just reverse google search it.
Boom. The first result was some other people running into the same problem on StackOverflow.
Skim..
Skim..
Skim..
"... have you added .js at the end of your file name?"
OH MY GOD I FORGOT TO ADD .JS AT THE END OF MY COMPONENT FILE.
Goodnight folks ( I know it's 3pm )
Top comments (0)