From Vue to Mithril
I subscribe to the Golang Weekly newsletter. Last week, they had a link to a repo for an application called duit which is built with Go and Mithril. I did a quick search comparing Vue to Mithril and found this article by the Mithril folks.
Go has always been close to my heart because "Go is expressive, concise, clean, and efficient.". I've been looking for a JavaScript framework that is built with the same values:
Why use Mithril?
In one sentence: because Mithril is pragmatic. This 10 minute guide is a good example: that's how long it takes to learn components, XHR and routing - and that's just about the right amount of knowledge needed to build useful applications.
The pragmatic characteristics also come out in their documentation:
As a rule of thumb, if your team is already heavily invested in another framework/library/stack, it makes more sense to stick with it, unless your team agrees that there's a very strong reason to justify a costly rewrite.
However, if you're starting something new, do consider giving Mithril a try, if nothing else, to see how much value Mithril adopters have been getting out of under 10kb (gzipped) of code. Mithril is used by many well-known companies (e.g. Vimeo, Nike, Fitbit), and it powers large open-sourced platforms too (e.g. Lichess, Flarum).
I also really liked hearing Mithril has more documentation than it needs - this saves me from having to search around for the right information and I learn a little more at the same time:
Mithril documentation typically errs on the side of being overly thorough if a topic involves things outside of the scope of Mithril. For example, when a topic involves a 3rd party library, Mithril documentation walks through the installation process for the 3rd party library. Mithril documentation also often demonstrates simple, close-to-the-metal solutions to common use cases in real-life applications where it's appropriate to inform a developer that web standards may be now on par with larger established libraries.
I tried it out for an afternoon and then decided to convert the project over to use Mithril. Have no fear - I left the old govueapp repo intact and then created a new repo called gomithrilapp and then copied the code and commit history over. You'll also notice there are a lot of the same blog posts. Enjoy the new language!