When I'm parsing markdown text, I will have a string whose content is a svg file, such as
<svg height="100" width="100">
<circle
cx="50" cy="50" r="40"
stroke="black" stroke-width="3" fill="red" />
</svg>
As far as now, it seems that the only way to render this svg string is to use dangerouslySetInnerHTML, I wanna to ask:
- Will this way inefficent?
- Is there any more efficent way in React?
Thanks for reading this issue.
Looking forward your awesome answers.