by lhorie · 11y ago · 0 comments
On a related topic, I talk about complexity walls (the idea of code that outgrows a framework's zone of comfort) here ( http://lhorie.github.io/mithril-blog/decreasing-cognitive-lo... ) and there are slides for a presentation I gave a while back that talks about the design decisions that went into Mithril to reduce learning curves. (here: http://lhorie.github.io/mithril-presentation-oct-js-tech-nig... )
Hopefully, in time, more people will realise the "zen" of mithril's minimal approach. In the meantime, interested readers can check out lichess.org, which recently rewrote its impressive UI using mithril.
Mithril is an awesome framework. A breath of fresh air really.
return m("html", [
m("body", [
m("input"),
m("button", "Add"),
m("table", [
m("tr", [
m("td", [
m("input[type=checkbox]")
]),
m("td", "task description"),
])
])
])
]); return <html>
<body>
<input>
<button>Add</button>
<table>
<tbody>
<tr>
<td><input type="checkbox"/></td>
<td>task description</td>
</tr>
</tbody>
</table>
</body>
</html>
[1] https://github.com/insin/msx/ m "body",
m "input"
m "button", "Add"
m "table",
m "tr",
m "td",
m "input[type=checkbox]"
m "td", "task description"--After doing some reading it looks like it replaces some of knockout and sammy but I'd lose data binding and dependency tracking of knockout.
Dependency tracking can refer to two things: tracking changes for the purpose of updating the DOM (which Mithril does handle, albeit in a different way), or computed properties (which I personally think are not a good idea, but that you could do w/ an observable library from microjs)