SVG attributes getting ignored
INPUT:
<marker id="triangle"
viewBox="0 0 10 10"
refX={0} refY={5}
markerUnits="strokeWidth"
markerWidth="4" markerHeight="3"
orient="auto">
<path d="M 0 0 L 10 5 L 0 10 z"/>
</marker>
OUTPUT:
<marker id="triangle" viewBox="0 0 10 10" data-reactid=".0.1.1.0.0.1.2.1.0.1.0.0.1.0.0.1.0">
<path d="M 0 0 L 10 5 L 0 10 z" data-reactid=".0.1.1.0.0.1.2.1.0.1.0.0.1.0.0.1.0.0"></path>
</marker>
Missing properties — refX, refY, markerUnits, orient
Marker tag also misses markerWidth and markerHeight
All attributes will be passed through to svg in the next release now that #5714 has landed. We won't be adding anymore individual attributes.
So, until then? When is the next release?
On Sat, Jan 2, 2016, 12:35 AM Paul O’Shannessy [email protected] wrote:
Closed #5763 https://github.com/facebook/react/issues/5763.
— Reply to this email directly or view it on GitHub https://github.com/facebook/react/issues/5763#event-503832933.
Regards, Tushar Mathur. www.tusharm.com
We'll ship 0.15 when it's ready. Rough estimate: probably not in January.
But what is the alternative, I am drawing all my graphs in SVG using react. Is it simply impossible to do this right now ?
As of now I am using dangerouslySetInnerHTML :(
Which seems pretty dangerous to me.
That or manually calling setAttribute on your svg node are the alternatives. The escape hatches are there but they are obviously unfortunate. The situation will be better soon.