Search code examples
reactjstypescriptreact-spring

React typescript type error with react-spring


I'm getting errors while trying to assign styles to a circle. I'm using react-spring

My code

Errors > Photo with errors that I'm getting2


Solution

  • cx and cy properties should be supported as CSS property, but it seems they missing in typescript definition. Maybe lack of browser support? You can change them from css to element property, this way you can get rid of the error message.

     <a.circle cx={maskedCircleProps.cx} cy={maskedCircleProps.cy} r="9" fill="black" />