top | item 37347230

(no title)

raphaelcosta | 2 years ago

Doesn’t make any sense for me why we are now using React in the backend, to render HTML… Let’s go back to 10 years ago.

discuss

order

tmpX7dMeXU|2 years ago

Having a templating system in ‘that environment’ is worth its weight in gold IMO. I’ve been switching between Svelte and Django templates a lot lately, and Svelte just…knowing about the DOM, makes the experience so much nicer. I haven’t come across a non-JS template system that does this. And yes, I was there for PHP and jQuery and whatever.

raverbashing|2 years ago

I have to agree, Django templating (last I saw) was stuck somewhere in Web 1.0

Jinja2 is better, but most of the time, I would just build the API and not bother with rendering anything on Django itself

mattmanser|2 years ago

We've had templating systems on the server-side for many decades?

Do you mean having a javascript templating system maybe? Not really worth it's weight in gold.

ojkelly|2 years ago

Reacts programming model appeals to people, and react is good at problems that have a predictable output like HTML.

Plus if your frontend is react, it’s much easier to keep all the html generation in one place.

ttfkam|2 years ago

A combination of the devil you know and Stockholm Syndrome.

It was better in many ways than the dominant techniques in 2013, sure, but that's not a terribly high bar, especially when observing the React model a decade later.

React served well enough for quick starts. It proved… challenging… for ongoing maintenance and quality control in long-lived projects.

jalapenos|2 years ago

Because 25yo "senior" devs with egos to support needed old tech to disparage to that end and PHP was it.

DustinBrett|2 years ago

Because Vercel wants to host your backend and they have their hands in React

satvikpendem|2 years ago

Because it's nicer than most other templating systems, and when you want to add interactivity, it's nice to have everything in one language and paradigm. Plus, static typing support.

mhd|2 years ago

I recently read about a "page-based routing" library for… PHP.

zanellato19|2 years ago

It really doesn't make sense.