[英]Using <image> svg tag with React
I wish to use the svg <image>
tag with React, but it is not supported at the moment. 我希望在React中使用svg
<image>
标签,但目前尚不支持。
Is there any workaround other than inserting html dangerously? 除了危险地插入html之外,还有其他解决方法吗?
Will it be supported in the near future? 不久的将来会支持吗?
What is the reason this particular svg tag is not supported? 不支持此特定svg标记的原因是什么?
Thanks 谢谢
dangerouslySetInnerHTML
dangerouslySetInnerHTML
以外,没有其他解决方法 It is now supported just use: 现在支持使用:
<svg>
<image xlinkHref="//url.of.image" width={600} height={400} />
</svg>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.