Hacker News new | past | comments | ask | show | jobs | submit login

thx for your comment, as i said i might get all wrong. Still think PHP template engines like Twig are well designed and make you highly productive. Personally, I feel JSX is a code smell, as it mixes UI snippets with code. But this is maybe my old school software engineering attitude. I am just waiting for the next OSCommerce package written in JSX...



> mixes UI snippets with code

You can never really avoid it unless you only use HTML. Templates are code. I think JSX is nicer because it's fully featured and the same syntax as regular JS, not a subset limited template language


I haven't used Twig, but have used other PHP templating engines. Scope is the big deal for me. JSX has actual scoping (it's just JavaScript), function calls, etc. PHP templates have one scope, even when you enter an included sub template.

Laravel released template components in version 7, but I haven't been able to try them yet and I'm hoping they'll improve things.


Exactly. I'm not a great fan of PHP but nothing has produced more killer apps in the last 25 years.




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

Search: