Hacker News new | past | comments | ask | show | jobs | submit login
Mithril.js 2.0 Released (github.com/mithriljs)
92 points by mesaframe on July 24, 2019 | hide | past | favorite | 19 comments



Huge congrats to the Mithril team. Been using Mithril for over two years now. I credit Mithril and its amazing community for making me the front-end developer I am today. When the massive amount of tooling and plugins for React overwhelmed me, the simplicity of Mithril and its focus on JavaScript fundamentals saved me and helped me gain a better understanding of modern JavaScript UI frameworks.

If you're curious, I highly recommend giving Mithril a shot, if not just for a simple toy project. The Gitter chat (https://gitter.im/mithriljs/mithril.js) is also always active and full of great people.


Mithril is a true work of art. Rendering, routing, and XHR are all provided in a bundle under 10kb. All pure JavaScript with no compilation needed. Closure-style components that make React Hooks look wholly unnecessary. And the list goes on.

So many correct decisions made, slowly and carefully, by a fantastic community that values discovering the right way to do things above all else.


Not sure what React hooks are other than maybe a replacement for Redux, but how does using closures help out?


Mithril is fantastic. I think it does a great job of giving you the 20% of features that cover 80% of what you need to do for a solid web app.


This seems like a significant release, so it's a shame that there's nothing in the changelog or on the interwebs at large that tells me why it matters. Does anyone know?


Over time, a few things were identified that would require a breaking change to improve. These changes have to happen at some point, and the 2.0 milestone is that. The community agreed that a big bang major release makes migration easier than many disjointed breaking changes mixed with other bug fixes of various priorities.

Prior to this release, the Mithril team went through painstaking troubles to release RCs to help consumers prepare for the breaking changes and find issues before the official version bump. Now that the code is deemed stable, the 2.0 milestone simply formalizes that the major version bump is now official.


lhorie and smuemd, thank you for the additional detail, but as a non-Mithril user I still don't understand the big picture.

For example, Vue 2.0's announcement[1] made clear that the release was about performance, new render functions enabling new component-based patterns, and server-side rendering.

What's going to "wow" Vue and React users who haven't looked at Mithril?

[1] https://medium.com/the-vue-point/vue-2-0-is-here-ef1f26acf4b...


Honestly, none of the 2.0 stuff is really all that interesting to an outsider. And ironically, often times the "wow" factor of other frameworks are old news to Mithril users. Mithril has had "modern" "zero-cost" features like closure components (similar to the recent svelte v3 data "API") for years. Some things _still_ don't exist in major frameworks (e.g. css selector support in hyperscript API, lifecycle hooks in fragments, or as event handlers, or true POJO-as-a-global-data-store support).


In my opinion the Mithril community is only mildly interested in evangelizing Mithril. They're much more interested in coding. To such a community, breaking changes that improve code are the wow factor.


Mithril uses Semantic Versioning (https://semver.org/) if I recall correctly. All the 2.0 signifies is that there are major breaking changes. If you're curious about those changes, take a look at the changelog: https://mithril.js.org/change-log.html#v200

Otherwise, the "big picture" hasn't changed since the v1 release. Mithril is a lightweight alternative to those frameworks that provides routing, auto-redraw, closure components, XHR utilities, reactive streams, and a testing framework out of the box. The v2 release has less to do with gaining market share or generating hype than it does refining an already great tool.


> What's going to "wow" Vue and React users who haven't looked at Mithril?

That doesn't seem to be covered by the release announcement, but is addressed here:

https://mithril.js.org/framework-comparison.html


This helps contextualize Mithril a lot, thank you!




big user of mithril is lichess, in both web and mobile app


Can someone explain what Mithril is and why I might want it? Not a troll.


It's a web framework, similar to React/Angular/Vue. It comes with router and xhr utilities (like Angular), but it's smaller and faster than React/Vue.

What makes it interesting is that it has a very pragmatic philosophy: if you have 10 mins to spare, going over the getting started guide will cover the majority of what is really needed to build a meaningful web app, which makes it ideal for devs who aren't interested in complicated webpack setups and just want to get stuff done (you can use it idiomatically from a plain HTML and a CDN, even).

People like Mithril because it's more "vanilla JS" than other frameworks.


https://github.com/MithrilJS/mithril.js/blob/next/README.md#...

> ”What is Mithril?”

> ”A modern client-side Javascript framework for building Single Page Applications. It's small (9.55 KB gzipped), fast and provides routing and XHR utilities out of the box.”


Obviously, I was looking for something more than your pedantry.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: