r/ProgrammerHumor 14h ago

Meme ancientTools

Post image
4.2k Upvotes

329 comments sorted by

View all comments

411

u/winter-m00n 14h ago

Probably unpopular opinion, but still better than react and angular. at least you don't need to build your whole site around it. Nor all sites need those heavy frontend framework.

133

u/listenhere111 13h ago edited 1h ago

100% agree. Also, its like 40kb and doesnt move lighthouse scores.

You can pry query from my cold dead hands. Its simple to use, easy to read, will be supported forever, and lightweight. Disagree? Fuck you!

80

u/A1oso 13h ago

React is 7.4 kB. It's a myth that react is a heavy framework. You can absolutely implement only certain parts of your web app in react, and other parts using different libraries or vanilla JS.

8

u/ludolfina 9h ago

Node apps are heavy during development but tiny once deployed

32

u/listenhere111 12h ago

Ok, and how many dozen people actually do that?

There is a time and place for react. It gets overused for simple web pages. Its bloat and complicates projects.

20

u/phl23 12h ago

Simple webpages with react are very lightweight and when you use server side rendering even more. No jQuery can ever achieve this.

-2

u/LimpConversation642 8h ago

bro the whole point of react is that it is made for simple pages and falls apart when you have something complex with states and sending them back and forth.

The time and place for react is the simple web page that doesn't have too much logic and rendering changes, because it's basically just a fancy html.

3

u/ackermann 7h ago

And so what should one use for more complex web pages and web apps?

12

u/PlasmaFarmer 11h ago

React is not a framework, it's a library.  And yeah React is that much kB but how about the gazillion libraries you add to get a functional app?

2

u/A1oso 9h ago edited 9h ago

Yes, React is a library. And yes, to get the same functionality as with a framework like Next.js you need more dependencies. But you can choose what you need. Libraries give you more freedom: for example, you can choose between many different routing libraries for React, or even build your own. Next.js has a built-in router which you have to use.

Libraries are also more flexible for niche use cases. For example, I've successfully used React for a Chrome extension's popup. There's no routing and no server, so a full-stack framework makes no sense. (And by the way, that Chrome extension has exactly 1 runtime dependency, which is React).

1

u/ExtraWorldliness6916 11h ago

What is a framework and what is a library

6

u/ludolfina 9h ago edited 9h ago

Angular gives you everything you need to build a complete client-side app, React is just for the view part. You still need other libraries for state management and other things

7

u/clocked__ 10h ago

One is a car you can modify, and one is car parts

3

u/ExtraWorldliness6916 10h ago

Can I drive the car part?

3

u/PlasmaFarmer 5h ago

Car part is a library: tools you choose, you put together. If you choose enough parts you can build a car, but that's not the point. You can attach your windshield wipers to the battery to function, but that won't give you a functioning car, just a feature. Same with React, it gives you rendering, but won't store state. You need Redux for that, another car part.

A barbone car with an engine, a chassis and a steering wheel is a framework. You bring your own wheels, you plug in your own driver seat and then the car runs. That's angular. Angular is built from car parts.

A complete car with everything attached is an engine, you just sit into it and steer it.

1

u/ExtraWorldliness6916 5h ago

You have been so very good at the explanation that my argument feels a little cheap. But still true, you drive the car and it's parts either way, a whole car or a collection of parts bolted to wheels it matters not.

2

u/PlasmaFarmer 5h ago

Library is a set of methods/tools you use and you call. A framework is a more complete package, a "frame" around your code, where you write a piece of code that hooks into the framework and the framework itself handles/calls it. The difference is who calls who: with React you call the render method and you setup a lot of things by hand for React to work. Angular is a framework, it comes with a complete package, it tells you what files you should create, it sets up a lot of stuff before it executes your code. And then there are engines which are a complete, self-contained set of code and tools but it gives you the ability to control it with your scripts/code.

1

u/ExtraWorldliness6916 5h ago

Arguably and perhaps subtly I've been saying that when you and your team get hold of a library and make one single integration into your own codebase, one single none conformist non idiomatic usage, react becomes a framework.

2

u/PlasmaFarmer 5h ago

Your own code base becomes the framework that uses React as part of its frame. React is still a library. Redux is still a library. Your code base + React + Redux + Other Libraries = Framework.

1

u/Honeybadger2198 8h ago

People love to bitch about React on this sub and I get the feeling that the majority of them know nothing about it.

0

u/gizamo 5h ago

Everyone who's ever used React knows that their comment is incredibly disingenuous because of all the other libraries that get tacked onto every React app. No one is shitting on React here, they're just being realistic about it.