var comp1 =
{
name:'app',//имя тега
html:`<h1>App is working!</h1>`
}
document.querySelector(comp1.name).innerHTML = comp1.html;
<!DOCTYPE html>
<html>
<head>
<title>hi</title>
<meta charset="utf-8">
<link rel="stylesheets" href="style.css">
<script src="app.js" type="text/babel"></script>
</head>
<body>
<app></app>
</body>
</html>