Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, this appears to be the normal reaction to JSX (it took me 3 months to actually try React just because of the idea of it - more fool me).

My advice is to try it at least to the point where you've created a couple of components and rendered one inside the other. A component manages everything to do with how it works with props it's given and the state it manages, and how it renders is just another part of that concern.

One of the nice pros you get used to quite quickly is having your editor autocomplete event handler and data variable names, as they're all right there in the same file.

JSX is just sugar for React.createElement() function calls, the syntax of which otherwise gets quite unpleasant to write and maintain once you start nesting them to any degree (ask anyone who's used a DOM builder library for a complete app).



Can we really call it syntactic sugar when it leaves a bitter taste in your mouth?


The idea of it did, but the experience of it didn't (IME).


Would that be syntactic caramel?


JSX is syntactic aspartame: sweetish and toxic in large doses...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: