A Colorful SVG In Plain HTML Is All Black In React. Why?
I'm using React in Meteor. When I add an SVG to the React component, style is not applied. But the very same code is working as expected in a plain HTML. Here is my SVG code:
Solution 1:
classic camelCase.
<stop stopColor="#00D7B9" offset="0%"/>
<stop stopColor="#B95DD7" offset="50%"/>
<stop stopColor="#FFB367" offset="100%"/>
(mind that react expects camel case properties)
Post a Comment for "A Colorful SVG In Plain HTML Is All Black In React. Why?"