
import {
  // less typing...
  create as c,
} from '@schematize/ui.js';

// create a section element
const app = c(`section`, null, {}, (el) => [
  // create an h1 element as a child of the section element
  // - whose parent is the section we just created (indicated by the second parameter)
  c(`h1`, el, {}, () => [
    // create a text node as a child of the h1
    // - with a data value of 'Hello World!'
    'Hello World!'
  ])
]);

// append the element to the body
document.body.append(app);