News for hackers. Stuff that matters.
Re:JSX is no longer my friend by M4v3R on Tuesday March 15, 2016 @04:53PM (#11292895)
Exactly this. Can someone explain to me what do people see in JSX way of creating components? What happened to good ol' code vs template separation and what's now wrong with having two separate files - .html (or jade, or whatever) and .js?
Re:JSX is no longer my friend by bicknergseng on Tuesday March 15, 2016 @05:11PM (#11293036)
What does code/template separation actually achieve? Ignoring JSX for a moment, why are templates a good thing? Are you actually simplifying something by using {{#each}} instead of .map()? Is {{#if}} really better than if()? Seems to me like templates don't actually decouple code.
Re:JSX is no longer my friend by bigpeopleareold on Wednesday March 16, 2016 @06:58AM (#11296339)
In a large application, it starts to become a pain to deal with. It doesn't obviate the need to be careful over mixing responsibilities. In general, React components should just be things that render out to the DOM. If the HTML code is in JS, it doesn't matter as much as the more important thing of separating out your application layers.