I am optics network engineer, so apparently web development is not my career. but from time to time i build webapps to help myself & co-workers to do some automation stuff. In order to create the html part, I am trying as much as possible to avoid react & similar libs, since most of the time, i am building small apps. so i dont really need it. what i am depending on , is to create html templates with some JS variables then append it to my document. something like below :-
<div class="randomClass">${divLabel}</div>
Then when i would need to add this template to HTML from JS i do this :-
var template = `<div class="randomClass">${divLabel}</div>`
$("body").append(template )
of course with bigger HTML templates scale, so createElement is not easy since the HTML template will be much more bigger. so i see this is more easier than use createElement for each element and so on.
Is it ok to keep going with this ? or I am missing somepoint maybe impact me in future ?
Thanks awesomes.