4 ms·
Disclaimer, Mithril core dev here. I'm not as familiar with Hyper. In Mithril: The hyperscript function supports Emmet/Zencoding syntax: `m('input.myClass#myI
by pygy_ 9y ago
Disclaimer, Mithril core dev here. I'm not as familiar with Hyper.
In Mithril:
The hyperscript function supports Emmet/Zencoding syntax: `m('input.myClass#myId[type=radio]')`
There's a stream library for state management (not an out of the box solution, but a robust building block).
The Mithril router
- supports `path`, `search` and `hash` modes
- supports asynchronous resolution (for lazy module loading)
- parses the current route at mount time and launches the app at that route if possible
The renderer
- has lifecycle hooks (that fire when nodes are created, updated, and removed, before and after the DOM is mutated),
- supports fragments (components can return arrays) and raw HTML nodes (the former with keys support).
- optimizes keyed diff for insertion/deletion of contiguous nodes
- AFAICT Mithril handles the attribute/property dichotomy better
Mithril also comes with a querystring parser and builder.
There are probably a lot of other small things that I didn't notice (and there may as well be errors in my assessment of hyperapp)
Edit: I take back what I said about forms. Either Chrome got their act together or hyperapp is doing something that I don't understand yet... Anyway, the naive app works well: https://flems.io/#0=N4IgTgpgZpDOAWAhArgF1QewHYgFxQEMAbWCAGhFKIgGNUIATPEAOgCtYQKoBLaz3AG1QWAgFsIzFvFRiiXEDWz0sqZgB54AZgB8AHSwACQ2J6p4YPgfUB6bfqzqGPAG6GeDALx6Qp85aIfHVtnFwdNXQNjeABPAAcIMAI4uOs7SMdQ9y8fWISwIJDXBxAAXzIRcUlcVg4FJVUIVWYG2FQTDAYIIkNPExY2yHEACgByGngCLABzCBM5niNzOdMGBmpRgEoDAzEWMQxkVWG-Cz4yQ2AowxceCAB3Yc2ro2NDSFRkMCNBa7eTMaLOJoUYXF7-f7YIFoXD9e5meAAQXQYDGLmIyAgoI6XSImzIfwh6KImNhOO6T0JxnK+KpANGcWxB1xT22r2MAF1rqUDKU2QZWu1gPALsk4qVeoY8okxTtRClhuD3hgMKhYdKwATXm0CPRYcBiaTDONJjMVgslvAVh51ljytdbg9YcMdfRRXQeNhYJtejpDMNCfAxqFscByoZfuy3kHRtDUKGdqg9EmU4aILDXRAWGmtRC3lCsMC1YY5p4-QQPV6WBMprNhlnUAQwLNUNmMXM2Xm+bmITHGWDw5m2ySIJ23hz+ahaa8K6hPVhYPrCTWzc7M+6516LmmfWXLtdk4eo8YPl8jAb2zysIfUFfqbzNmUKiBRBIpDRYJwKA0VGoamUOQoIhFgAawEYQQC+eQahkVA4kXGwbCOOIQOmasMDEGxTgCAABABGFgCLwhRUHiaoQDqcpQCg5hYPg3BEOQ1D0Mw7C+HwwjCJsQYIHEbjUCGPY6goUiEmYSjnxomD0HoxjC2YpRMI1MUSLI8TOFKDlSiAA https://flems.io/#0=N4IgTgpgZpDOAWAhArgF1QewHYgFxQEMAbWCAGhF...