Muhammad Asif Javed
Muhammad Asif Javed

Reputation: 618

SVG images are not showing in reactjs

i want to create svg shapes dynamically and append it to dom using react here is the jsfiddle link

Svg shapes are not displaying in react

Upvotes: 2

Views: 1069

Answers (1)

Henrik Andersson
Henrik Andersson

Reputation: 47172

If the goal is to draw a cat then the problem is that your d: properties is full of new lines thus making it not being a valid SVG path.

Check your console and you'll see the error Uncaught SyntaxError: embedded: Unterminated string constant.

Fiddle Demo

Upvotes: 2

Related Questions