Skip to content Skip to sidebar Skip to footer

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.

<stopstopColor="#00D7B9"offset="0%"/><stopstopColor="#B95DD7"offset="50%"/><stopstopColor="#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?"