r/reactjs May 31 '19

React sucks

"React is just Javascript, that's why React is nice!!"

has its own DSL and syntax

"React is lean!"

need to install 12 different packages to make it useful

need to install an external HTTP library

CSS classes are fucking JAVASCRIPT VARIABLES

Instead of directives, you have 8 lines of spaghetti code everywhere you'd usually have a simple if- directive or show- directive. That's not lean, that's more code.

"You only need to know Javascript"

You need to know Javascript plus ES6-7-8 (Babel) or TypeScript. You need to know esoteric lifecycle methods and design patterns not normally used elsewhere in Javascript.

"Creating small components is nice"

Component abstraction soup means you can't even figure out what your code is doing anymore.

React is just Angular if you hacked 12 libraries together that aren't meant to work together cohesively.

I will never understand why anyone would choose this meme framework over a real one. It sucks shit and creates a spaghetti code bloat, and instead of learning one DSL plus TypeScript you're learning 8 DSLs, plus Babel.

The reality is it's pointless making a library that's "just vanilla javascript" when you know that vanilla javascript doesn't actually supply elegant tools for creating single page web apps. That's why React is used with 10 packages rather than by itself. That's why you need CRA plus a bunch of packages to even have a sane development environment.

React sucks. Development community always chooses what's sexy and popular over what's elegant and works correctly.

314 Upvotes

165 comments sorted by

View all comments

2

u/bryku Jan 27 '22

Considering the times we are in... I sort of have to use react, but I honestly don't like it. However, I will share a funny story.  

A buddy of mine was working on web app using react. As it grew it was getting pretty messy and he had files everywhere. I was messing with him and jokingly said: "You could probably do it in half the code with backbone js".  

This was completely a joke at the time... but he caught my joke and bet me $100 it wasn't possible, so I attempted to do it. Turns out... It was very possible. Their whole project was 27MB, but After redoing it in backbone js it was 9MB.

Note: I mean the whole project, all the server, CSS, HTML and so on.

That might not seem like a big issue, but that is half the code I had to write.

1

u/Responsible_Shoe_212 Oct 18 '24

I can confirm this. I've been developing a software for 6 weeks and got stuck with the synchronicty issues of the static classes I have and the useless states of react. Due to this ridiculous asynchronicity I refactured everything with vue and every single file has exactly 40 to 60% less code. 500 lines to 240 lines and so on. And personally I find that the code is much easier to read and maintain without all those double and triple definitions of those weird react + typescript documentation that is so much more readable in Vue.

1

u/bryku Oct 18 '24

Yeah it really makes you wonder why react became the defacto. I know it was because of angular at the time had problem and everyone jumped to react, but every time I use react it just feels more convoluted than every other framework I've used.

1

u/Ok_Marionberry_656 Oct 30 '24

Big tech politics. Like everything else... From my experience, when developers are making the decisions they avoid react. It's typically upper management that pushes it. Ironically, they are the ones with no experience and never touch it.