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

I understand the instinctive reaction against JSX. I did a lot of Perl and PHP way back when, when it was super common to have bits of template sprinkled hither and thither with logic woven in here and there, and it made maintainability a nightmare. When the world moved on to dumb templates and embrace of MVC, it was a huge relief. JSX felt like a regression in that regard, but in practice, I think it ends up being pretty straightforward, in part due to the lack of any real flow control inside of it, and in part because of the convention of having small functional components which return a JSX tree, rather than bits of JSX just popping up everywhere here and there.


> JSX felt like a regression in that regard, but in practice, I think it ends up being pretty straightforward

> rather than bits of JSX just popping up everywhere here and there.

I did see lots of codebase write jsx like this. So I hate it. I starts the journey of front-end from jquery, ejs, angular.js, react to vue. And jsx of react always feels like a bad step to me.

Yes, If you write jsx properly, then it is just as readable as a normal template. But somehow some people never get it. And react also never made any attempt to stop insane codebase like this to exist.

(And you'd better pray your previous codebase owner isn't one of these, or you are in a big trouble)


You can definitely do JSX wrong. React doesn't do a whole lot to protect you from it, it's true. But, in a project which uses it well, I hate it a lot less than I once did.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: