How can a dynamically created SVG polygon access an onClick function in a React functional component?

前端 未结 0 1650
醉梦人生
醉梦人生 2021-02-06 06:16

Below is the problematic code in question. It works except for polygon.setAttribute("onclick", "logMe(this)"); line which throws the error

相关标签:
回答
  • 消灭零回复
提交回复
热议问题