Hacker News new | ask | show | jobs
by jordow 5332 days ago
Rendering arbitrarily on either the client or server is hard. Other solutions that I saw forced the developer to have to think about it, so I developed FaxJs which allows the system to handle that complexity for you.

https://github.com/jordow/FaxJs

The gist is that you just write standard declarative ui structures in pure javascript and the system disassembles the markup on the server, and reassembles it on the client with all the events still in tact. You wouldn't know all that is happening just by looking, though.

    ...
    var twoDivs = {
      className: 'outerDiv',
      onClick: this.outerDivClicked,
      innerDiv: {
        className: 'innerDiv',
        content: 'inner-most-div!'
      }.Div()
    }.Div();
Or you can just do it all on the client too, if that's your thing. You'll need to work to get this integrated into your routing technology as with any rendering system.