Support namespaced tags
See original GitHub issueIs it worth supporting namespaced tags (commonly used in svgs)?
<svg role="img" class="next-icon next-icon--size-16" aria-labelledby="next-website-aecd81959dee2d276ba35c68b2e61e59-title">
<title id="next-website-aecd81959dee2d276ba35c68b2e61e59-title">View your online store</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#next-website"></use>
</svg>
Here xmlns:xlink
and xlink:href
are not valid in JSx. React works around this by allowing camel cased versions (xmlnsXlink
and xlinkHref
).
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
SyntaxError: unknown: Namespace tags are not supported by ...
I get the following error when trying to download svg as a React Component. SyntaxError: unknown: Namespace tags are not supported by default. ......
Read more >Rendering Namespace Tags/Attributes Like xmlns:inkscape In ...
In this article we are going to see that how you can render some attributes that react does not support(throws error if you...
Read more >Tags and Tag Namespace Concepts - Oracle Help Center
Defined tags support policy to allow you to control who can apply your defined tags. The tag namespace is the entity to which...
Read more >Bug: [5.0] SVGs cannot be imported (not as components, but ...
SyntaxError: unknown: Namespace tags are not supported by default. React's JSX doesn't support namespace tags.
Read more >React Upgraded to 17.0.2 and getting `React's JSX doesn't ...
2 and getting `React's JSX doesn't support namespace tags` message. Just performed this upgrade from 16.11. Below is the error line and the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@developit Namespaces are valid in JSX now, in fact they are the preferred route instead of camelCase.
Can confirm this is working in 5.x: https://jsfiddle.net/developit/0qgbw2sg/4/ (jsfiddle’s version of Babel is not current so I’m using hyperscript directly).
Let me know if I’ve missed anything in making sure this is addressed.