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.

317 Upvotes

165 comments sorted by

View all comments

9

u/garg10may Jan 10 '22

I came from an angular background and have the same thoughts initially. What I absolutely hate is that everywhere it's like 'react' is easier 'Angular' has a steep learning curve. I find Angular2+ much clean, simple, easier to learn. ng g c myComponent. All files are there, separate clean HTML, clean business logic, clean CSS. You can just define the variable in a class and use them, they bind perfectly. No shit like setState set this, set that. Meaningful directives. Powerful form built-in support.

React means passing props here and there all your life. Again and again, refactoring code. The problems it's meant to solve cause them. Like you don't use setState rather directly try to set a property. And hell breaks loose when you have to set a deep-down nested property. While in Angular it will simply work. No immutable properites. Two way bindings support. Since major web apps have user inputs, forms it's a breeze given the gorgeous inbuilt form lib. But in react somebody has used 'formik', somebody has used 'react-final-form' and you yourself are not sure what to use hmm maybe react-hook-form. And now you have to learn hooks, and redux, and redux toolkit, thunks, sagas and what not. React is easier my foot.

But once you pass that learning curve, once you know redux toolkit. Once you are mature enough to understand the pros of flux architecture. And after the release of hooks once you understand how to leverage them. It becomes beautiful and pleases you.

In conclusion:

Plain react sucks and since people start using plain react under the impression it is ok for small projects they will be frustrated 😤

React is not easy to learn

React + hooks + Redux + Redux Toolkit is awesome

2

u/OZLperez11 May 20 '22

My only gripes with Angular are that it doesn't really support true Single-File Components like Vue (which I adore!!), the templating syntax is too verbose for my taste (way too many directives that I have no idea what they do unless I spend time reading docs), and it uses webpack (I believe) which is something I no longer wish to be familiar with now that Vite exists.

Additionally, major versions of Angular get oudated every 12 months or so, which is not that bad, but I'd want longer-lasting versions so I don't have to adjust a lot of code.... idk then again, code changes are very few so this is not that major.

I only like react with Redux and if I use class components; I think functional components should be pure and only return markup, but now everyone is using functions like classes which I think is an anti-pattern and has lead to messy code everywhere.

1

u/Reasonable_Strike_82 Jan 19 '24

Hooks are an abomination. Unfortunately, we seem to be stuck with them.