react-magic icon indicating copy to clipboard operation
react-magic copied to clipboard

Should remove the `xmlns:xlink` entirely, and replace `xlink:href` to `xlinkHref`

Open reggi opened this issue 9 years ago • 4 comments

I just used the html to jsx converter.

In the example of

<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#next-remove" />

It should remove the xmlns:xlink entirely, and replace xlink:href to xlinkHref.

Thoughts

reggi avatar Apr 20 '16 05:04 reggi

Is that actually HTML? <use> isn't a HTML tag.

Daniel15 avatar Apr 24 '16 00:04 Daniel15

It's used within <svg>. Unsure how it should be treated. Support for xlinkHref exists in jsx.

reggi avatar Apr 24 '16 16:04 reggi

Reference: http://stackoverflow.com/a/32994814/2152076

rayshan avatar May 12 '17 01:05 rayshan

xmlnsXlink is now supported in the React docs, so it probably shouldn't be eliminated. https://facebook.github.io/react/docs/dom-elements.html

Probably a better option is just to handle namespaced attributes by camelCasing them and eliminating the colon, since that's invalid JSX.

osdiab avatar Jun 02 '17 19:06 osdiab