DEV Community


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 ${}</h1>`}

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

Test it here Mithril & htm

Discussion (0)

Forem Open with the Forem app