Home > OS >  How to draw multiple Rectangle inside SVG
How to draw multiple Rectangle inside SVG

Time:02-02

I am using react with typescript. In my project, I am trying to draw multiple rectangles on my SVG. The first rectangle is easily drawn but when I am trying to draw another rectangle the previous one will disappear and then the new one is drawn. How do I maintain the previously drawn rectangle in a state and then render them?

complete sandbox Edit naughty-driscoll-0ytqf

  •  Tags:  
  • Related