DEV Community

Discussion on: Javascript DOM Manipulation to improve performance

Collapse
 
howardjesstrupanion profile image
howardjesstrupanion

innerHTML is pretty darn fast: browsers have been optimized for its use, because programmers seemed to like it. See codepen.io/jwhooper/pen/GzKwMV

But unless you're building massive DOM structures (scores of thousands of elements), you're unlikely to actually see the difference in performance. I'd rather worry about writing clear, maintainable code.

Collapse
 
grandemayta profile image
Gabriel Mayta

In this case you can use a tiny library like lit-html