News for hackers. Stuff that matters.
Re:Deku: How we built our functional alternative to React by madeofpalk on Monday May 11, 2015 @09:18PM (#9528969)
I think because you just end up doing it anyway.

Note that this isn't mixing just any JS, it's only presentational javascript. Either you're using some templating language like Handlebars or Jinja/Django's or Angular's HTML attribute data binding, or lots-of-jquery-selectors-tied-directly-to-the-html, you still need some sort of view logic to build your DOM.

Don't get me wrong, I've never really used React/JSX in depth enough, and I'm not overly enthusiastic about all these 'HTML' tags in my JS. But lets not pretend this is any worse than the current approach of $('.modal').append(document.createElement('button'))

Re:Deku: How we built our functional alternative to React by lmm on Tuesday May 12, 2015 @06:24AM (#9530642)
What I want is the wicket model, essentially a stricter version of Angular's HTML attribute data binding, where virtually the only thing you can do is <tag myframework:id="someid">, and you can connect to "someid" in code - but only as a literal, and the only thing you can do is replace that tag with a component, nothing more complex. All the current approaches are too liberal, too "there is more than one way to do it". I want to have one, and only one, simple rule for how data goes into HTML.
Re:Deku: How we built our functional alternative to React by woah on Tuesday May 12, 2015 @09:48AM (#9531702)
Self discipline?
Re:Deku: How we built our functional alternative to React by lmm on Tuesday May 12, 2015 @11:42AM (#9532564)
IME self discipline without enforcement never works, especially on a multi-programmer project.