This is an example of a very simple Mithril.js component, which is just an object with a view function.
To activate the component, we have to use m.mount.
The example was taken from the official website at https://mithril.js.org/index.html#components.
If anyone has some improvements, that should be addressed, let me know by opening an issue.
Or simply fork the repository on GitHub, push your commits and send a pull request.
For starting your work, you can click the edit link below. Thanks for contributing.