News for hackers. Stuff that matters.
Re:Mithril.js – A modern client-side Javascript framework by untog on Saturday August 18, 2018 @01:52AM (#17787089)
A lighter-weight and largely API-compatible replacement for React: Preact.

https://preactjs.com/

Re:Mithril.js – A modern client-side Javascript framework by dammitfoo on Saturday August 18, 2018 @02:06AM (#17787123)
Sure. If you still want to be React-like, that is! But React, Preact are still view libraries right? Mithril is a (reasonably) complete framework. It's sufficiently similar to React that if you know React, you can get productive in Mithril very fast. I guess mithril is for people who want a full framework with no fluff that gets out of the way.
Re:Mithril.js – A modern client-side Javascript framework by allover on Saturday August 18, 2018 @05:25AM (#17787648)
> But React, Preact are still view libraries right?

No, they're component-oriented. View suggests you're doing MVC or similar. You don't need an M & C with React -- you will likely need to add react-router, but react + react-router (or preact + preact-router) is all the 'framework' you need for most apps.

Re:Mithril.js – A modern client-side Javascript framework by dammitfoo on Saturday August 18, 2018 @05:39AM (#17787697)
Ok. For that matter, Mithril is also component-oriented and router is included.

And what I meant by react being a view library is that react by itself only handles the UI part and you need to get additional libraries to handle stuff like routing and talking with the server. This stuff is provided by mithril itself.

Re:Mithril.js – A modern client-side Javascript framework by nkkollaw on Saturday August 18, 2018 @07:18AM (#17787991)
> If you still want to be React-like, that is!

Well, you (or the author) are comparing it to React in your title, so of course people assume that you're targeting React devs.

Now you're saying that it's something different?

Re:Mithril.js – A modern client-side Javascript framework by dammitfoo on Saturday August 18, 2018 @01:09PM (#17789421)
I'm saying Mithril is a simpler alternative to React, not React-like. Preact is react-like (same API as react); Mithril isn't.
Re:Mithril.js – A modern client-side Javascript framework by nkkollaw on Saturday August 18, 2018 @03:18PM (#17790091)
jQuery is simpler than React. HTML is simpler than React. What a weak selling point, then.
Re:Mithril.js – A modern client-side Javascript framework by dammitfoo on Sunday August 19, 2018 @12:44AM (#17792651)
It seems you're missing the point. React and Mithril both employ virtual DOM, both use components and both allow higher abstractions that provide ways to manage complexities that arise in front-end development. Jquery and HTML don't do that.

I tried both Mithril and React and found Mithril to be simpler than React as it 'gets out of the way'.

I invite you to read this for more detailed comparison :

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

Re:Mithril.js – A modern client-side Javascript framework by l5870uoo9y on Saturday August 18, 2018 @05:35AM (#17787683)
And it is even smaller than Mithrill, Preact being 3kb and Mithril 8kb.
Re:Mithril.js – A modern client-side Javascript framework by cmx66 on Tuesday August 21, 2018 @11:09AM (#17810251)
mithril.js includes a router and an ajax helper (that is much simpler than fetch)

If you include those in preact they may have similar size.