News for hackers. Stuff that matters.
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by beefsack on Tuesday May 26, 2015 @09:30AM (#9604664)
I'd be more interested to see a performance comparison with Mithril[1] rather than React, their core functionality is similar but Mitril strives to be lean and fast.

[1] https://lhorie.github.io/mithril/

Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by rattray on Tuesday May 26, 2015 @09:34AM (#9604691)
Agreed. Mithril's performance is incredible, and it's also closer to React in philosophy. That's the alternative I'd be looking at (perhaps along with Vue, which also goes unmentioned).

EDIT: though, one difference is this supports server-side rendering out of the box, while Mithril requires a (tiny) third-party module: https://www.npmjs.com/package/mithril-node-render

Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by lhorie on Tuesday May 26, 2015 @11:45AM (#9605534)
There's also another more ambitious Mithril isomorphism project called misojs https://github.com/jsguy/misojs

Definitely worth looking into if you're looking for a full stack solution.

Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by jatins on Tuesday May 26, 2015 @01:01PM (#9606039)
I wish Vue were more popular. It has one of the nicest APIs of all the JS frameworks and offers good performance.
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by keslag on Tuesday May 26, 2015 @10:02AM (#9604881)
Mithril's use of helper assisted javascript for it's view templating is a giant drawback for me. I'd be using it exclusively, but as an old crusty dev, I've gone down that path more than once, and it's always been a train wreck.
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by vvpan on Tuesday May 26, 2015 @10:50AM (#9605212)
You mean how the DOM is constructed via JS functions? There's this project to fix it: https://github.com/insin/msx
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by keslag on Tuesday May 26, 2015 @11:23AM (#9605401)
Thanks for this, I was looking for something that could keep me using Mithril.
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by insin on Tuesday May 26, 2015 @11:45AM (#9605539)
FYI, you can use Babel to transpile JSX for Mithril by putting this in .babelrc:

    {
      "jsxPragma": "m"
    }
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by jonahx on Tuesday May 26, 2015 @11:41AM (#9605509)
I thought this at first too -- the syntax turned me off. But having it used it for a while now, I can say any drawbacks are purely cosmetic, and it's easy to get used to. If that's the only thing holding you back, I'd say to give it a try.
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by Meai on Tuesday May 26, 2015 @10:45AM (#9605180)
What do you mean by "helper assisted javascript"? Can you give an example where this has caused problems for you? I'm trying to decide between mithril and this library.
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by keslag on Tuesday May 26, 2015 @11:20AM (#9605391)
Sorry, poor word usage on my part. As vvpan more eloquently puts it, DOM construction via js functions. This is the example from their website. This is very difficult to maintain, and personally, I become very adverse to making changes. Though it appears vvpan has a link to a project attempting to fork(?) React's transformer to be usable in mithril.

    todo.view = function() {
        return m("html", [
            m("body", [
                m("input"),
                m("button", "Add"),
                m("table", [
                    m("tr", [
                        m("td", [
                            m("input[type=checkbox]")
                        ]),
                        m("td", "task description"),
                    ])
                ])
            ])
        ]);
    };
Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by pygy_ on Tuesday May 26, 2015 @12:18PM (#9605738)
Not "attempting to fork", MSX is a JSX fork that outputs Mithril-compatible virtual DOM JS objects.

It works as advertised :-)

Re:Show HN: An Isomorphic JavaScript Framework Faster Than R... by keslag on Tuesday May 26, 2015 @09:27PM (#9608769)
Since I've been called out twice on my use of language in this thread alone, I serious need an editor to proof my comments before I submit them from now on.