question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support namespaced tags

See original GitHub issue

Is 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
trueadmcommented, Jun 28, 2016

@developit Namespaces are valid in JSX now, in fact they are the preferred route instead of camelCase.

0reactions
developitcommented, Jul 9, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found