4 ms·
I put a performance comparison for React on the homepage yesterday (the link takes you to the actual test page so you can run it yourself). It simply measures r
by lhorie 13y ago
I put a performance comparison for React on the homepage yesterday (the link takes you to the actual test page so you can run it yourself). It simply measures running js time for initial rendering, which is the ugly, unavoidable cost of frameworks that authors don't like to talk about. The numbers are mostly averages, but should give a reasonable idea of what is faster than what.
I also do go more in depth here ( http://lhorie.github.io/mithril/comparison.html http://lhorie.github.io/mithril/comparison.html ). TL;DR: The main differences is that Mithril is a lightweight MVC, whereas React is a powerhouse at doing only the "V" part.
There's actually a project that uses React to enable HTML-y Mithril templates here ( https://github.com/insin/msx https://github.com/insin/msx ), so the two can certainly coexist.
Mithril's light weight is mostly a result of picking a very small set of tools that are simple but useful on their own, but that also happen to come together nicely and that can play ball w/ Javascript's FP capabilities and the JS ecosystem as a whole.
Mithril is also a bit of a experiment in making a framework that gets out of your way - more hacking and less figuring out what is the syntax to do X. If that's your cup of tea, I'd recommend checking out the blog that I just started last week ( http://lhorie.github.io/mithril-blog/ http://lhorie.github.io/mithril-blog/ ), where I talk about reusable programming techniques.