4 ms·
> 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.
by iLoveOncall 3y ago
> 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.
- jalapenos 3y agoFunny 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.
- jiggawatts 3y ago> using frames again. That’s pretty much what htmx is…
- sublinear 3y ago> "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.
- fjfuvucucuc 3y agoSo like PHP? This thread is so cope.
- deleted 3y ago[deleted]
- trilbyglens 3y agoI 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.
- omnimus 3y agoWell React was born in Facebook which was famously PHP codebase. It makes sense.
- parminya 3y agoJSX 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.
- fjfuvucucuc 3y agoOh please, I professionally use both daily (enjoy them both), but even I can see JSX is just PHP with extra steps.
- thewix 3y agoThough not JSX, with TSX you get type checking with your markup.
- wildrhythms 3y agoMy 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.