Skip to content

Instantly share code, notes, and snippets.

@gilbert
Created March 7, 2017 19:37
Show Gist options
  • Save gilbert/4520990643e00ff91df53505e4fe2e37 to your computer and use it in GitHub Desktop.
Save gilbert/4520990643e00ff91df53505e4fe2e37 to your computer and use it in GitHub Desktop.
Minimal Mithril 1.0 boilerplate
<!doctype html><title>Minimal Mithril</title>
<div id="app"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mithril/1.0.1/mithril.min.js"></script>
<script>
var AppComponent = {
view: function (vnode) {
return m('h1', "Hello World!")
}
}
m.mount(document.getElementById('app'), AppComponent)
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment