Vlad Dewitt
Vlad Dewitt

Reputation: 21

React.js. Error: Invalid value for <path> attribute d

I want to add SVG in React component. I use CoffeeScript without JSX:

svg viewbox: '0 0 800 600',
   path 
      id: 'top'
      d: 'M300,220 C300,220 520,220 540,220 C740,220 640,540'

and I get this error:

Error: Invalid value for <path> attribute d="M300,220 C300,220 520,220 540,220 C740,220 640,540"

Upvotes: 1

Views: 640

Answers (1)

Robert Longson
Robert Longson

Reputation: 124209

Seems reasonable, a cubic bezier defined using the C command must have 6 values following it and yet your final one has only 4.

Upvotes: 1

Related Questions