DEV Community


Discussion on: Vanilla JavaScript and HTML - No frameworks. No libraries. No problem.

theodesp profile image
Theofanis Despoudis

You can also create a cached element that will compare the previous rendered string with a new one, so if the new one is different that the old one then you can replace with innerHTML. Simple and easy.