Open martijnvermaat opened 8 years ago
However, this approach requires the use of <use xlink:href="#id"/>
tag with custom xml namespace, which is not supported by React at this moment.
This issue tracks the support of SVG tags in React in general: facebook/react#1657
However, this approach requires the use of tag with custom xml namespace, which is not supported by React at this moment.
I believe this to be incorrect. You can see in this fiddle that xlink:href
is supported. It just needs to be written as xlinkHref=
instead:
<use xlinkHref="#shape" x="50" y="50" />
Looks like that would certainly work for us, I'll give it a go.
Thanks a lot for leaving a comment here! :hand:
Was: GitLab #32
We should define shapes and other symbols in the
<defs/>
element in svg for reuse.