Level: beginner • Mithril.js Version: latest
This example shows the classic Hello World in Mithril.js. The example was taken from the official website at https://mithril.js.org/index.html#hello-world."
Type | Name | URL |
---|---|---|
script | mithril@latest | https://unpkg.com/mithril@latest |
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Hello World</title>
</head>
<body>
</body>
</html>
m.render(document.body, "Hello World")
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.
In this code sample Mithril.js' m.render
API method is use, besides the basic hyperscript function m().
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!