logoalt Hacker News

zarzavattoday at 7:41 AM1 replyview on HN

I love JSX and hate HTML template syntax, so there's at least one person.

What I like about JSX is that you can reuse all of the control flow primitives from JS. You have if, for, map, filter, flatMap, etc. if you want a new combinator, just write a function as you would for any other type of data transformation.

I consider this one of the biggest advantages of React compared to the approach of having separate templating and scripting languages.


Replies

aatd86today at 10:25 AM

For me it is the opposite. I dislike having imperative constructs pollute my otherwise declarative markup. To each their own I guess.

show 1 reply