Skip to content
Advertisement

Uncaught DOMException: Failed to execute ‘createElement’ on ‘Document’: The tag name provided

i had created card component and i called in my ProductPage.js after that i am getting error like Uncaught DOMException: Failed to execute ‘createElement’ on ‘Document’: The tag name provided (‘/static/media/Card.c3b0a67ff849f2bda062.JS’) is not a valid name. initially it was div and i change to card after that i am getting above error if changed div then it is working fine how can i solve this issue. For ref Please find the attached image. enter image description here

enter image description here

and code is like this.

ProductPage.js

JavaScript

Card.js

JavaScript

Advertisement

Answer

you are using the img tag inside the card so you need to render the children not the props.card.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement