Mithril

What is Mithril?

Mithril is around 12kb gzipped thanks to its small, focused, API. It provides a templating engine with a virtual DOM diff implementation for performant rendering, utilities for high-level modelling via functional composition, as well as support for routing and componentization. Mithril is a modern client-side JavaScript framework for building Single Page Applications. It’s small (< 10kb gzip), fast and provides routing and XHR utilities out of the box.

Getting started

An easy way to try out Mithril is to include it from a CDN and follow this tutorial. It’ll cover the majority of the API surface (including routing and XHR) but it’ll only take 10 minutes.

Let’s create an HTML file to follow along:

<body>
    <script src="https://unpkg.com/mithril/mithril.js"></script>
    <script>
    var root = document.body

    // your code goes here!
    </script>
</body>


official mithril.js.org


src stackshare.io/mithril