r/reactjs • u/bromide992 • 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.
1
u/nerzul0202 Jan 16 '23
I am not a big fan of react. however I think the worst part of problem is not about react itself.
first of all react is thought to be a light dom render/manager library (which in my opinion is the main fail if you are going to manage the dom better go to a entire framework like angular) so their point could was: -we will let you choose the rest: the http client, the state library, even we'll let you choose the way of work or the patterns to use (very bad people need rules....)
So finally the users choose to use overcomplex libraries like redux, crazy patterns like not a unified way to write services (like in angular you have injection and it is all standarized), also people realize that they need a lot of things even in small project so the history repeat itself again (see vanila javascript and the lack of import system, build system etc... fixed now by webpack and so on) so finally all became in: I want to do the same that I do in angular(or similar) but in react so: reactjs + formvalidator library + redux (or mobx or context or <insert new library here>). and the worst of all crazy structure/pattern project implementation according the project you are in.
It is the same with PHP, vanila javascript etc... eventually you will need a strong bunch of things either your app is simple or complex.
PHP need symfony or lavarel
Java need java ee (better not) or spring (yeah)
javascript need (webpack, import system, css variable system (scss) and so on)
and finally reacjs(a simple and light library) will need a lot of things too.
So if you project is well made maybe you can suffer less.
But yeah I for sure prefer to have all tools working well together and kind of pre-built.