I read one article on html5 canvas. This is drawing with lines. So when adding each new line, the author clears the canvas and re-draws all the previous ones. And this makes sense if you want to undo actions or layers. But wouldn't it be better to do the drawing completely over again only in cases when you really need it?
I have never taken up the schedule and do not know how stupid this question is and whether there is any sense in this method. Please explain.