Hacker News new | ask | show | jobs
by treenyc 3745 days ago
Why not mithril? https://lhorie.github.io/mithril/

Seems to be way faster, and easier to learn than any of those other framework/libs.

For example: How is Mithril Different from Other React: Source: https://lhorie.github.io/mithril/comparison.html

"The most visible difference between React and Mithril is that React's JSX syntax does not run natively in the browser, whereas Mithril's uncompiled templates do. Both can be compiled, but React's compiled code still has function calls for each virtual DOM element; Mithril templates compile into static Javascript data structures.

Another difference is that Mithril, being an MVC framework, rather than a templating engine, provides an auto-redrawing system that is aware of network asynchrony and that can render views efficiently without cluttering application code with redraw calls, and without letting the developer unintentionally bleed out of the MVC pattern.

Note also that, despite having a bigger scope, Mithril has a smaller file size than React."

3 comments

I'm really interested in mithril from a technology stand point. The thing that holds me back from using it is the ecosphere around it. You look at powerhouses like react and angular and you can find a whole gamut of reusable components that you can just plug and play from the community.

For instance: the twitter bootstrap framework we have options for both react (https://react-bootstrap.github.io/) and angular (https://angular-ui.github.io/bootstrap/).

But with mithril, the only bootstrap library I have found has not been updated in 2 years (https://github.com/eddyystop/mithril-components-bootstrap).

I really wish mithril had a bigger community around it, as when I used it for a few prototypes it was a pleasure to work with and fast as hell.

I've been using Mithril a bit, and I like how it's just a library, not a big framework pushing you to use a particular set of components. It's very light and very well documented.

There are these "Mithril" libraries for Bootstrap and Material with 1 contributor and not updated for years, not appearing official at all. In my experience they don't really work.

I'd say it's more in line with Mithril's design to use UI components that are also loosely coupled, like these: http://topcoat.io/ http://purecss.io/

Personally, my ideal library would be one that doesn't make me 'beg for help'... one that is so easy to use that I can just 'weave it in' to all of my existing HTML that need it without needing a mountain of pre made parts to work faster. After all... making strait HTML is pretty damn fast with any competent template engine, server side or client side.
Getting a more MVC approach and still leveraging the react ecosystem is making me seriously consider trying react+mobx.
If you want the React semantic without the size, you can just use something like https://github.com/developit/preact (which is like 3kb once deployed).

You also don't need JSX if you don't want to. Using React without JSX and just aliasing the dom functions ends up looking almost the same.

The reason behind React and Flux is because of pitfalls behind MVC...though the whole rational behind that is probably not fit for an hacker news reply :)

Mithril is really nice, I've been following its progress since the beginning. If I had to use a framework, Mithril would be my first choice.

lichess.org is a very busy application built around Mithril.