Skip to content
Advertisement

Instagram embed: React’s JSX doesn’t support namespace tags

I was trying to embed an Instagram post on my React website but I encountered the error “Namespace tags are not supported by default. React’s JSX doesn’t support namespace tags. You can set throwIfNamespace: false to bypass this warning.” Where am I supposed to set throwIfNamespace: false. My first guess is node_modules/react-scripts/webpack.config.js. Where in webpack.config am I supposed to put throwIfNamespace: false. I found this question but the accepted answer shows how to change SVG attributes.

This is where I place my Instagram embed

JavaScript

and this is the error I get

JavaScript

Advertisement

Answer

You need to edit your .babelrc

an example:

JavaScript

You can find more info here

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