Earlier quoted context omitted.
And this is exactly why any of my hobby projects that involve JS are done with plain JS, with as few libraries as possible. I might pull in specific libraries, but I don't want to pull in a giant framework that will be outdated the next time I decide to work on that particular project.
A micro-library like https://redom.js.org/ does make things easier though. I have also given up on mega-frameworks - just too many things to keep in mind as I get older.
function ce(tag, attrs={}, children=[]){
var el=document.createElement(tag);
for(var attrName in attrs){
el[attrName]=attrs[attrName];
}
for(var child of children){
el.appendChild(child);
}
return el;
};