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?
