DEV Community

artydev
artydev

Posted on

Mithril with HTM

You like JSX, but you don't want to deal with Babel & Co, give htm a try.

 const html = htm.bind(m);

 const Ciao = function ({attrs}) {
   return {view: () =>  html`<h1>Hello ${attrs.name}</h1>`}
 }

 m.render(app, m(Ciao, {name: "Raph"}))

Test it here Mithril & htm

Top comments (0)