The new Mithril 1.x documentation is great! But I had some philosophical disagreements with the tutorial app.
Take a look at
index.html to see my re-write.
At a high level, here are my issues with how the Mithril tutorial is presented:
The tutorial assumes you use a particular workflow and set of tools.
You cannot follow along unless you have Node installed (for NPM) and can call statements like
var m = require("mithril")
There is no such thing as
Apparently there will be
And that's what attracted us to Mithril in the first place...
Source split up
The tutorial app is a wonderful, tiny example program.
But the source is split up into tiny files and scattered into a heirarchy of directories.
Ugh! I hate this style.
I'm completely okay with other people doing this to their own codebase.
But what a terrible way to muddy the otherwise elegant simplicity of the application!
So my re-write is splat all in one file. Where you can see it all in one glance.
Espouses opinions about CSS, etc.
And I quote: "a good rule of thumb is to avoid the cascading aspect of CSS". What?
Look, I'm totally cool everybody's opinions about how to structure code and how to use CSS and such. But the tutorial is a weird place for it.
My re-write has a tiny little
main.css file with some simple styles to make the app functional.
You're not here to learn CSS.
You're here to learn Mithril.