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

> The ability to interleave code and HTML was also tacky and never taken seriously

And yet people would take a bullet for React and the JSX templates.



Funny how "server side rendering" became a hot new thing too.

I was so confused when I heard that, "like... a HTML file?".

Keep going at this rate and we'll be using frames again.


> "like... a HTML file?"

Serving a static HTML file is not server-side rendering.

It's much dumber than that. The people advocating for SSR want the server to respond with HTML generated based on whatever is in the request.


So like PHP?

This thread is so cope.


> using frames again.

That’s pretty much what htmx is…


I too find this hilarious. Not because I want to defend PHP, but moreso that I personally sort of despise react and it's whole ecosystem. I've never liked writing code less than when dealing with a spaghetti monster react app.


Well React was born in Facebook which was famously PHP codebase. It makes sense.


JSX and PHP are actually seriously different. When you break out of PHP, you're just outputting text to standard output. When you're using JSX syntax, you're constructing Javascript objects that can be manipulated using standard javascript techniques. Anyone who believes they're comparable seriously doesn't understand the task that is before them.


Oh please, I professionally use both daily (enjoy them both), but even I can see JSX is just PHP with extra steps.


Though not JSX, with TSX you get type checking with your markup.


My reading of this thread is that people are comparing JSX as a templating language to PHP as a templating language, splicing PHP <? ... ?> into HTML like how we have { ... } in JSX. At the end of the day React lets you write a function that returns HTML just like a PHP file.




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

Search: