loading...

Mithril with HTM

artydev profile image artydev ・1 min read

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

Discussion

pic
Editor guide