TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Alternative lightweight UI library to modern day frameworks

137 pointsby turbletyover 4 years ago

16 comments

aetherspawnover 4 years ago
We shipped a very major product (300 person company) on Mithril.js a few years back when React was young and Angular was the go-to in this space.<p>We had a fairly positive experience, but ran into enough problems here and there with vdom rendering bugs that we eventually decided to rewrite the entire product 4 years later in React.<p>Certainly, it did was it was supposed to very well, until we really pushed it to its limits with vdoms that were complex and mutating in real time. Then we broke it non deterministically and couldn&#x27;t reliably reproduce the issues that we were having each time for a solid bug report. Couldn&#x27;t really even reproduce them consistently in production, they would just happen in random places.
评论 #25801978 未加载
评论 #25801187 未加载
评论 #25801129 未加载
评论 #25801330 未加载
评论 #25801731 未加载
yagodragonover 4 years ago
Right now Next.js might be the hottest front end framework but I&#x27;m looking for something simpler to build SPA&#x27;s. I&#x27;m not interested in SSR or SSG at all. Mithril.js looks very promising as it provides you with everything you might need to build a simple web app out of the box. The only other frameworks that do that is Angular and Ember, but they&#x27;re both declining in popularity especially Ember. On the other hand React.js has CRA that is very complicated and doesn&#x27;t even come with routing out of the box. Is there any other good and modern SPA framework out there?
评论 #25802187 未加载
评论 #25804145 未加载
评论 #25803267 未加载
评论 #25802347 未加载
评论 #25802484 未加载
评论 #25802355 未加载
_ks3uover 4 years ago
I like to chime in every time I see a thread about Mithril. I learned modern SPA development with Mithril and in many ways still prefer it over React or Svelte.<p>It&#x27;s definitely starting to show its age as many of the main contributors have moved on and new libs are being created everyday. However the chat [1] is still very active and there are always great discussions going on there that are often not even specifically about Mithril. One of the best dev communities I&#x27;ve found, honestly.<p>One major benefit of Mithril for me is the lack of need for polyfills while still including a router, XHR utils, and simple state management, AND being compatible with IE11 out of the box, which is invaluable for many government contracts I work on where I don&#x27;t want to introduce any potentially complicated build tools to an already complex codebase.<p>[1] <a href="https:&#x2F;&#x2F;gitter.im&#x2F;mithriljs&#x2F;mithril.js" rel="nofollow">https:&#x2F;&#x2F;gitter.im&#x2F;mithriljs&#x2F;mithril.js</a>
评论 #25804575 未加载
fortytw2over 4 years ago
I used to use mithril for almost every new project I&#x27;d start, but I&#x27;ve switched over to using React w&#x2F; Hooks for just about everything for two main reasons:<p>- toolchain support is a lot less finicky and better supported (you can use parcel and it &quot;just works&quot;) - should I need to bring in a obnoxious third party library, it&#x27;s far more likely to exist in a react world than mithril<p>If you&#x27;re just building something small &#x2F; on your own, mithril is definitely worth a shot though, it&#x27;s relatively pleasant to use and packs in some very handy XHR related helpers
评论 #25802759 未加载
评论 #25805089 未加载
wruzaover 4 years ago
If you want to try mithril in a mid-sized project, sure do it, cause it is a nice, free as in freedom library to render vdoms without imposed opinion on how to manage state. But be aware that it has no error handling around view() method and any error thrown from there will irreversibly break mithril internals everywhere on the page, this is by design. Second thing, I didn’t push it to the limit as another commenter, but massive vdoms (many tens of thousands of vnodes) are slow to even rebuild and compare, so you’ll have to use lazy techniques described in docs. It is not exclusive to mithril, but worth knowing. Otherwise, mithril is basically a core vdom tech similar to vue and&#x2F;or react, wish these two had their render cycles as separate packages. Also, if someone knows a cheap way to turn react into mithril’s spirit, e.g. via light setState-detaching layer, please share.
评论 #25801317 未加载
评论 #25801777 未加载
leontrolskiover 4 years ago
Mithril is the React Facebook would have written if its devs didn&#x27;t have too much time on their hands - it&#x27;s wonderfully simple.<p>I stole their API somewhat for my 33-line-React, if you have any interest in how stuff works under the hood - check it out! <a href="https:&#x2F;&#x2F;leontrolski.github.io&#x2F;33-line-react.html" rel="nofollow">https:&#x2F;&#x2F;leontrolski.github.io&#x2F;33-line-react.html</a>
c-smileover 4 years ago
Just in case someone interested.<p>Mithril works as it is in Sciter.JS<p>Yet this:<p><pre><code> JSX = m; &#x2F;&#x2F; let&#x27;s use Mithril as a driver of JSX expressions </code></pre> enables built-in and native Sciter&#x27;s JSX extension to work with Mithril:<p>See demo: <a href="https:&#x2F;&#x2F;github.com&#x2F;c-smile&#x2F;sciter-js-sdk&#x2F;blob&#x2F;main&#x2F;samples&#x2F;mithril&#x2F;JSX&#x2F;mithril%2Bjsx.htm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;c-smile&#x2F;sciter-js-sdk&#x2F;blob&#x2F;main&#x2F;samples&#x2F;m...</a><p>Sciter.JS uses QuickJS with JSX parsing extension added : <a href="https:&#x2F;&#x2F;github.com&#x2F;c-smile&#x2F;quickjspp&#x2F;blob&#x2F;master&#x2F;quickjs-jsx.h" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;c-smile&#x2F;quickjspp&#x2F;blob&#x2F;master&#x2F;quickjs-jsx...</a> . It is significantly easier and effective to add JSX as part of native JS parser rather than to have monstrous JS-parser-in-JS infrastructure of Babel.
rajeev-kover 4 years ago
I have noticed newer generations of developers believe they need heavy frameworks like React to develop web applications. Most apps don&#x27;t need such heavy frameworks. Here&#x27;s a 500-line &quot;framework&quot; (if you can call it that) <a href="https:&#x2F;&#x2F;github.com&#x2F;Rajeev-K&#x2F;mvc-router" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Rajeev-K&#x2F;mvc-router</a> and here&#x27;s an example app built using it: <a href="https:&#x2F;&#x2F;github.com&#x2F;Rajeev-K&#x2F;eureka" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Rajeev-K&#x2F;eureka</a> For templates I used <a href="https:&#x2F;&#x2F;github.com&#x2F;wisercoder&#x2F;uibuilder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wisercoder&#x2F;uibuilder</a> which is a 200-line lib. This is about as &quot;close to the metal&quot; as you can get, and still be productive.
评论 #25804403 未加载
temporallobeover 4 years ago
I’ve never used Mithril but in looking over this it seems very similar to a small library I wrote myself, especially with regards to routing and the use of # in the URI. I think solutions to certain problems are universal and the way we implement those solutions is the interesting part. Of course my library was never optimized for large-scale DOM mutations or other such real-world issues, but it’s always fascinating to see someone develop similar solutions. So why did I even write my own library? It was more out of curiosity than need. I also like to understand how “magical” things work, and for me, the best way to understand something is to try to do it myself, even if I don’t end up fully completing whatever “it” is. Discovery is a powerful benefit that I feel modern software engineering doesn’t provide as much as it used to.
NetOpWibbyover 4 years ago
I was an avid user of Mithril several years ago and even connected with one of the maintainers on LinkedIn. However, I ran into issues (I forget what they were at this point) building v1 of my social network and eventually found Svelte.<p>Mithril still has a place in my heart though, it was a joy to use.
noivover 4 years ago
Mithril is really special among JS frameworks. It has a very tiny API and thus the resulting components are powerful and highly reusable. I think of them as Lego bricks to build worlds inside browsers. Whenever the architects or product owners come up with an idea never seen before I prototype using Mithril, because all other tend to fail involving of unexpected amount of complexity. Mithril gives you all degrees of freedom and surprisingly often that&#x27;s considered a disadvantage.<p>Did I mention it&#x27;s fast?
christophilusover 4 years ago
I’d like to use a simple front end library that doesn’t use a vdom, doesn’t require a special state system, doesn’t require special compilation, is performant, and largely gets out of my way.<p>I currently use Preact and am pretty happy with it, even though it doesn’t check most of those boxes. Is there something that does?<p>Anyway, Mithril looks nice. I’ve kicked the tires a few times, but comments like the ones here in this thread have prevented me from adopting it.
评论 #25802141 未加载
评论 #25802084 未加载
评论 #25802372 未加载
评论 #25802768 未加载
评论 #25802464 未加载
oweilerover 4 years ago
The modern equivalent to mithril.js would be Hyperapp + Parcel for me. Easy to get started, with enough batteries included.
kreddorover 4 years ago
From the Framework comparison page: &quot;Guild Wars 2 uses Mithril (yes, inside the game!)&quot;<p>I would love to hear more about that! Anyone know where I can find more information?
评论 #25803117 未加载
IgorPartolaover 4 years ago
Does Mithril include state management? I see it’s being compared to Vue + VueX but I didn’t see other mentions of state management on the linked page.
评论 #25803155 未加载
评论 #25802669 未加载
评论 #25803225 未加载
cosmoticover 4 years ago
What does modern mean in this context?
评论 #25806263 未加载