DEV Community

artydev
artydev

Posted on

A note about Mithril

Mithril is a very nice framework. It's the first one I have been professionaly productive with.

Many, people don't like it's syntax.
If you prefer JSX, no problem, you can too.

Look at this demo JSX in Mithril:

/* @jsx m  */

let counter = 0;

function App () {
  const view = 
    <div>
      <div>Counter: {counter}</div>
      <button onclick={() => ++counter}>JSX-INC</button>   
      { m("button", {onclick : () => ++counter}, "m-CLICK") } //mithrilway
    </div>
  return view
}

m.mount(document.body, { view : App });

Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay