Edit in JSFiddle

const component = {
  el: document.getElementById('content'),
  data: { name: 'World' },
  render: function () {
    console.log('component renders', this.data)
    this.el.innerHTML = `<h1>Hello ${this.data.name}</h1>`
  }
}

component.render()
The classic:

<div id="content">…loading</div>