News for hackers. Stuff that matters.
Re:React vs. Ember – EmberNYC slides by mattdeboard on Tuesday September 02, 2014 @03:09PM (#8259490)
I really enjoy React's concepts. I have but one nit to pick with it and it's meta: mixing grammars in a single buffer really hoses syntax highlighting & indentation in emacs.

I'd much prefer to be able to "require" the JSX where I need it and have the right context passed to it. That way all the editor-specific nonsense can just be avoided.

Re:React vs. Ember – EmberNYC slides by lhorie on Tuesday September 02, 2014 @03:52PM (#8259734)
You could look into Mithril (a smaller React-like framework). It mixes JS and CSS syntax to achieve terseness, and it does so within the rules of valid javascript:

    m(".form-group", [
      m("input.form-control[placeholder='Name']")
    ])
Re:React vs. Ember – EmberNYC slides by k__ on Tuesday September 02, 2014 @04:04PM (#8259802)
I think using m() with CoffeeScript or LiveScript results in much more concise code than React.DOM. with JSX.

Well, you got to like semantically significant whitespace for this.

On the other hand, Mithril offers something like JSX, so the <> and ; crowd should be happy.

Re:React vs. Ember – EmberNYC slides by machty on Tuesday September 02, 2014 @03:18PM (#8259532)
The problem with this is that whatever you require() won't close over other variables/imports unless your preprocessor is straight up compiling JSX into JS and inserting into another JS file, which is kinda gross and eval-y.
Re:React vs. Ember – EmberNYC slides by arnemart on Tuesday September 02, 2014 @03:30PM (#8259596)
This can be avoided by just not using JSX. The React DOM API is not really that hard to use.
Re:React vs. Ember – EmberNYC slides by kansface on Tuesday September 02, 2014 @03:39PM (#8259645)
Its not hard, but it is rather verbose :(
Re:React vs. Ember – EmberNYC slides by dugmartin on Tuesday September 02, 2014 @04:07PM (#8259828)
Re:React vs. Ember – EmberNYC slides by pselbert on Tuesday September 02, 2014 @08:17PM (#8260899)
As @dugmartin mentioned, it's really quite nice if you are using coffeescript. It ends up resembling templating in a lisp, something akin to hiccup for example.

I imagine a similar effect can be had with ES6 destructuring assignment, just with more commas and mandatory array brackets.

Re:React vs. Ember – EmberNYC slides by kaonashi on Tuesday September 02, 2014 @03:59PM (#8259774)
There is a jsx-mode on elpa that seems to work pretty well. At least it does for me.
Re:React vs. Ember – EmberNYC slides by kansface on Tuesday September 02, 2014 @03:40PM (#8259651)
This also causes quite a bit of trouble with linting.
Re:React vs. Ember – EmberNYC slides by jergason on Tuesday September 02, 2014 @03:43PM (#8259676)
https://www.npmjs.org/package/jsxhint is a drop-in replacement for jshint that supports jsx syntax.