Hacker News new | ask | show | jobs
by codeflo 861 days ago
> JSX proves that HTML actually won.

While I think that might be true, similarly, JSX proves that for the dynamic parts of the template, you want a real programming language.

1 comments

I'd say that it's better to use real programming language, but you shouldn't use it in JSX beyond the simplest statements like ifs and loops.

Mixing any logic beyond that with HTML makes a mess of both.

I'm personally a fan of minimalist templating engines that provide only simple loops and conditionals so that template has to receive prepared data tree which is created by the actual programming language first and passed into the template.

Sounds like Django, which I’ve found maintainable.