-
Notifications
You must be signed in to change notification settings - Fork 47.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG <path> tag unrecognized with React 16 #10955
Comments
Please share a complete example reproducing this. Such as a fiddle or a GitHub project. Otherwise it is very hard to fix issues. |
Ah, you found my example :). I was still working on it, because I can't reproduce it there myself. I think it has something to do with the combination of external libraries. I will update the example when I find the time. Thanks! |
Oh, I just copy pasted your snippet into an empty page 😛 If you can provide an example that would be great. |
I’m going to close as this is currently unreproducible. I suspect that for some reason you were accidentally rendering If you find one, let us know and we can reopen. Or feel free to file a new issue. Thanks! |
Somewhat related, but you can see similar errors when using something like http://barecss.com/ with custom tags: <!-- card element -->
<card>
<p>Your content</p>
</card>
Users experiencing this legitimately are likely in the minority, I'm sure. |
The site says it explicitly:
This is not great because it prevents standards from actually introducing such elements in the future (since they may break existing websites). I don’t think we’ll be going out of our way to support this. |
Oh, I completely understand the implications. I just wanted to add that note that, again, likely a minority of people may see that's not directly related to SVG. It's a warning, after all. (for those that find this since it's ranked #1 in Google for this warning) |
Spammy spammy spammy. React should not warn us about using elements that are IN THE SPEC. |
I have an element in which I have code similar to this:
<svg width="100%" height="100%" viewBox="0 0 80 80"> <path ref={(currentLevel) => { this.currentLevel = currentLevel; }} className={styles.svgBorderCurrent} d="M40,10C57.351,10,71,23.649,71,40.5S57.351,71,40.5,71 S10,57.351,10,40.5S23.649,10,40.5,10z" /> </svg>
.The svg and it's paths are rendered, but I get an error in the console:
The tag <path> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
What is the right way to render this svg? I never got a message like this in React 15.x.
The text was updated successfully, but these errors were encountered: