This is the simple application from the official Website.
It shows off how to do most of the major things you would need to deal with while using Mithril.js.
As a prerequisite for this snippet, the latest version of Mithril.js framework is required.
Beginners should have no problems following this example, that simply shows some basic recipies.
Here we can see use cases of different Mithril.js API methods like m.request or m.route, besides the centrepiece m() hyperscript function.
Moreover, it shows how the lifecycle methodoninit can be used (better known as hook).
Also covered in this example is the use of Vnodes or virtual DOM nodes, a JavaScript data structure that describes a DOM tree.
The example was written by mithril, last edits were made on 16 October 2021.
The author has contributed some more snippets. Click here to see them all.
Did you note a typo or something else? So let me know by opening an issue.
Or much better: just fork the repository on GitHub, push your commits and send a pull request.
Ready to start your work? Then click on the edit link below. Thanks in advance!