Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's great about Mithril is that is squeezes a router in that tiny size.

None of the others have that I imagine. If you do need a full blown single page app, Mithril takes care of it all.



Yes! I don't think Mithril gets enough attention. It's my go to JS framework when I need more than Vanilla JS but don't need something like React.


Did you ever run into performance problem with Mithril? I like how simple it is to use but the idea to run / diff the entire component tree on every user interaction kinda scares me


I've been using Mithril since 2017 or so. The answer is: no. To give you a production example, Mithril is used in the video game Guild Wars 2 to render the marketplace in-game and the lead web engineer reported that it was performant enough for their use-case [1]. (I've played Guild Wars 2 and never noticed any issues with it, so good enough for me).

In most cases, your bottleneck won't be Mithril (or React for that matter), but instead what expensive computations you're doing in your components. While React has React.memo, Mithril has the `onbeforeupdate` hook [2] you can use to memoize components if you need it.

[1] https://carlmungazi.github.io/sourcecodeadventures/posts/pat... [2] https://mithril.js.org/lifecycle-methods.html#avoid-prematur...



Haven‘t heard of it yet. Sounds exactly like what i needed many times lately. Thanks!


Why would you ever need React over Mithril?


Colleagues, ecosystem


The ecosystem, if you're building a product of a certain complexity and can't afford writing large, complex, un-battle-tested views from scratch.


What's an example of a large, complex, unbattle tested view?


Material Design




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

Search: