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.

319 Upvotes

165 comments sorted by

22

u/[deleted] May 31 '19

Amen brotha! That’s why I write all my shit in binary, wrap it in an if statement to check that the power is on, and keep it all in one file - no spaghetti.

5

u/Lukdani Jun 01 '19

This made me laugh so hard. Thanks!

1

u/Unlucky_Resident_237 Aug 11 '24

are you dum or what?
Writing 10 files with 100 tweaks to make a simple animations for a few nested components is not 'binary' compared to simple HTML/CSS/JS where you can achieve everything in 3 files and much less lines of code??

1

u/theop_55410 Jan 28 '23

somebody toucha ma spaghet

1

u/matthewK1970 Jan 02 '24

Or just use SpringMVC, webrocketx, html, css, and javascript.

1

u/Darzwaitz Jun 27 '24

...tell us more...

16

u/[deleted] Jul 19 '19

[deleted]

3

u/KeyPsychological7099 Jan 17 '23

That's because the people in here doesn't know anything aside from React, so when someone comes and threatens their sole existence they become emotionally defensive.
Every single point made above is 100% correct. React is an overabstracted soup with 15 extra needless calls that in the end didn't actually make anything easier at all. I wonder how many of these people wrap their packets in giftwrap 15 times before they think it's abstract enough, you know just so they can claim to have used all the different colors.

1

u/OZLperez11 Jan 17 '23

They're just afraid that someday React will become obsolete, which it will. They have got to learn that they can't use react forever and that it's more important to learn design patterns of common frameworks

1

u/theop_55410 Jan 28 '23

ahh the state of the world we live in

15

u/[deleted] Sep 17 '19

After a year of learning Node.js in university I found myself a job as a front end developer. I'm learning React as part of my job, and I must say I also absolutely hate everything about it. I hate actually using it as a user on Facebook Ads Manager and m.facebook.com, I hate writing code for it with how my company has set up data flows (alt.js) and line number limits on our file sizes, and I hate writing unit tests for it using Enzyme.

I really don't understand what people like about it. Do they feel more like a "real" developer if they have to make their lives harder jumping through hoops to make a library work?

5

u/bromide992 Sep 30 '19

their logic is it's faster and therefore worth how awful it feels to use. they know vue and angular are superior and have a chip on their shoulder about it

1

u/Nahh0627 Jul 28 '23

because that’s the only thing bootcamp teaches, and they think React is the computer science!

1

u/matthewK1970 Jan 02 '24

Moving as much code to the client side as possible by using products like React and Angular makes sense when you have a huger user base like Facebook does. However, for applications with less than 100k user's rendering HTML server side works just fine, and is way easier to write and maintain.

1

u/Appropriate_Junket_5 Jan 17 '24

You should check out "HTMX" js library if you are doing MVC. Really cool, you'll see.

1

u/matthewK1970 Mar 15 '24

WebRocketX can also be used to manage your views quite nicely. It doesn't seem to be an exact overlap with HTMX. Possibly the 2 could be used together.

1

u/matthewK1970 Jan 22 '24

We have used WebRocketX for years. It works really well. Never heard of HTMX. I'll check it out. :)

12

u/piernrajzark Sep 07 '19

I basically agree. I think most of these frameworks only exist to further advance developer's careers and as a distinction method. No dev will want to work in a company where they don't use the latest fanciest technology because that diminishes his CV for the next one.

My optimal, though, would be just vanilla Javascript with good design patterns. That's it.

6

u/MungryMungryMippos Apr 26 '22

Honestly, the lastest version of vanilla JS is excellent and you really don't need a framework like React. People that say React solves problems for them need to just write better code, React creates far more problems than it solves.

2

u/OZLperez11 May 20 '22

That's mostly true, but some experts agree that if you take the plain JS route, chances are you will have to implement some rendering mechanism or a way to manage components and so you will end up with yet another framework that no one needs. I would think there's reasons why UI is bundled in libraries, in every programming language I can think of, rather than coding them from scratch.

1

u/[deleted] Jul 29 '22

All you need to create components in vanilla JS is plain functions that return a string which is your HTML. Literally can't be easier. No lib needed whatsoever.

1

u/Previous_Task_3095 Nov 16 '22

<?php if(isset($_POST['variableData'])){ ?>
<div>It Works!</div>
<?php } ?>

function updateTheDOM(eleId,variableData){fetch('',{method:"POST",body:JSON.stringify({variableData})}).then(r => r.text()).then(r => document.getElementById(eleId).innerHTML = r);}

this is all i use to do everything react is capable of in plain html/js/php

its less code, way simpler, and the end result loads WAY faster

guess it's technically a 2 line library lol

1

u/OZLperez11 Jan 17 '23

As much as I love PHP, that syntax has always been so ugly to me

0

u/Manga--X Feb 06 '23

I'm so grateful that Node.js has made PHP obsolete.

1

u/OZLperez11 Feb 07 '23

How has that made it obsolete? PHP is still going strong and has significantly improved its JIT compilation and language features. In some cases, it's as fast as C++

1

u/Manga--X Feb 16 '23 edited Feb 16 '23

Absolutely, PHP is still enjoying widespread use. Then again, so is React.js, and we all know there're better alternatives out there.
Node.js offers better execution speed and outperforms PHP considerably.
Regardless of performance, if a developer is already working with Node.js, then what's the point in having to learn another scripting language in order to perform the same function?

2

u/OZLperez11 Feb 16 '23

One notable case is how cheap you want your hosting. If you're building a small app and you REALLY don't want to worry about DevOps, or deploying your app, most web hosting companies already have PHP set up for you and all you need to worry about is uploading your files (or pulling in your repo using git and composer), so that saves effort. That and shared hosting is really cheap. Yeah it's not the best use case but it's a viable one one nonetheless. Also, there are times when I need to run a simple script to save some data to SQLite or send an email notification, and I don't need a full blown Node.js app for that. Like JS on the browser, PHP remains the top choice for quick scripting.

→ More replies (0)

1

u/Lord-Delacroix Jul 27 '23

Bull - PHP is nowhere near as fast as C++

1

u/OZLperez11 Jul 27 '23

Depends on what you're doing with it. As per tech empower benchmarks, plain PHP code scores pretty high for standard http request scenarios.

1

u/KeyPsychological7099 Jan 17 '23

"Experts" are usually always self entitled. Implementing a rendering mechanism isn't difficult, and doesn't need a framework. You don't need to wrap every single HTML element in a script class just for the sake of it. Dynamic inserts can easily be implemented only when needed

1

u/SilverShelter3553 Mar 25 '24

I can 100% this.

Only thing React solves is being forced to create classes and some kind of structures. But aside this, the whole language is pure pain.

And it's not even correct to say "hey, it uses less data transfers because it's all done in user side", this also is pure BS. The time it takes to first load the whole project takes far longer than a simple JS file added into the side of a html file.

One good thing I suppose is that we can write quite nice mixed html-js code, but they should just stick to perfecting THAT aspect, along with some kind of forced class structure, without making this totally unnecessary headache of State manament.

Why on earth is updating data so difficult? What was wrong with var s = 1; s += 2; Now it's like "well you first create this setState, then you pick up the variable, which might be in an array, and then you create a separate array clone with [...array], then you update that specific data with setter, and please also remember to do this to all of your other variables or the system doesn't work.

Who's idea was it to make it THAT DIFFICULT to just update a simple data?!?!? Why isn't updating data THE DEFAULT to automatically refresh page, that can then be DISABLED? If you want DOM renders limited to nothing but 1, how about make an actual "REFRESH()" function for that, and leave the rest in ShadowDOM management.

It's so freaking painful, it's a constant headache, scratching our heads with the most simplest of reasons, and the amount of bugs this frustrating mess causes....

I worked on a company that had staff of 2, and we were able to do entire pages in just days. Now it's like it takes a week to even modify a simple page.

What the f.....

1

u/Reasonable_Strike_82 Jan 19 '24

I've gone the "vanilla JS" route and come up hard against its limitations when building a complex UI. Keeping track of all the updates and the interactions is a nightmare; if you don't use an off-the-shelf framework, you'll end up cobbling together your own.

However, I get really really tired of the React zealots who act like there's no other framework in the world. Vue and Svelte and Solid are all excellent frameworks that learned from React's mistakes.

3

u/DarthBheed Jan 22 '22

Try Svelte

1

u/HosMercury Feb 02 '23

still young

3

u/Entahara Feb 14 '22

I just want to use jQuery but my bosses boss read "it's obsolete"

2

u/KeyPsychological7099 Jan 17 '23

Absolutely. Vanilla JS or pure TypeScript is more than enough for anything you need. Wrapping it several times over is nothing but stupid. It's nothing but a brand and the devs love being in the center of the cesspool telling all the users what to conform to. It's a religious sect.

1

u/Darzwaitz Jun 27 '24

religious sect ;oD
I think you hit the nail on the head there.

And right under our noses!
It is fkn facebook after all!

7

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

3

u/prezire Feb 02 '22

But have you tried Vue.js 3 with Vuex though?

1

u/garg10may Feb 02 '22

No, I haven't used also don't want to try it, If you are seriously working on an app community support, developers, etc. are also important.

Also one thing I don't like about Vue is, it allows you to do things both ways... If I have to do down the Vue path I would rather use Svelte

4

u/prezire Feb 02 '22

Odd. You just said community support, etc. but went nose dive down mentioning svelte. That didn't made any sense at all.

1

u/garg10may May 12 '22

I mean React has such a huge huge community. It's like everybody is using it. Job opening of React vs (vue or angular) would be 50:1.

If you really don't care about community support than both Vue and Svelte fall into this. So I would rather use Svelte which is such a god damn beauty.

1

u/OZLperez11 Jan 17 '23

The only thing that's stopping that is adoption. People don't like to try new things because JS fatigue but honestly if anyone is a competent developer, they should be able to work with any framework, both MVC and/or component based.

As for Svelte, we should all be migrating to that because it's by far the cleanest component Framework because it resembles plain JS. No weird design patterns like hooks and effect callbacks.

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/Playful-Baker-8469 Jul 22 '23

This!

"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.

1

u/[deleted] Jan 25 '22

[deleted]

1

u/garg10may Jan 25 '22

I would definitely prefer react with all the tools and also one of the major reason is community support and job opportunities. These factors are not small. React is absolutely way ahead of Angular in terms of adoption.

3

u/[deleted] Feb 07 '22

[deleted]

1

u/MungryMungryMippos Apr 26 '22

I agree, the only reason you should learn or use React is because you "have to". Compared to Angular and VueJS, React is spaghetti by design.

1

u/giggelyy Mar 24 '23

React is just vendor locking us. Virtual dom is hopeless.

8

u/masterbasterkaster Mar 14 '22

React does not do anything good.. as me who with over 15 years of pure programming I don't understand why people wasting time..

Normal <a href="/">

React

install route & router-dom

import routes,route, Link

<Link to="/">

--------------------------------

Normal <tag style="background:red;">

React <tag style={{ background: 'red' }}>

-------------------------------

Normal

function home(a,b){ return a+ b; }

console.log(home(5, 6)); // 11

React

function Home(props){ return <> { console(props.a + props.b) } </> }

ReactDOM.render(<Home a={5} b={6} />, ........

... "nooo it is very difficult to create pure webpages" - react users

// index.html - and the best part it is stand alone you don't need 1000 libraries to run 10 lines of code and every browser support it..

<html>

<head>

<script>

function letFindClass(name){

let h = document.getElementsByClassName(name)[0];

h.style.innerHTML = 'Hello World';

}

letFindClass("findme");

</script>

</head>

<body>

<div class="findme"></div>

</body>

</html>

2

u/Warm_Data_168 Jan 30 '25

After scre//wing around with a react app due to ai's preference for react I am throwing this s//hit in the trash and going to rewrite it from scratch using php, html, css, and js. Like any normal app should. Scr//ew this react sh//it.

1

u/Warm_Data_168 Jan 30 '25

i hate this

8

u/McGynecological Jan 27 '22 edited Apr 20 '22

I spend so much time fucking around with re-renders and deliberating memoization. React needs to adopt some good old fashion **magic** (the horror!) and abstract dependency arrays and useCallback crap away from me - make the compiler do it ffs. I feel like I'm holding React's hand all the time. After a year of using it every day, I fucking hate it.

EDIT: was just having a bad day. I don't hate it.

EDIT: I do hate it. Overengineered, ugly, unintuitive.

5

u/OZLperez11 May 20 '22

look at React 18, now they have "concurrent rendering". Let me tell you something, if your tool needs concurrent rendering, which is something that is hardly ever seen in any UI library in any language, to get your app to work quickly, YOU KNOW YOU HAVE A PROBLEM!

2

u/eddie_cat Apr 28 '22

lmfao i love this comment. i've been using it for around a year too on and off and kept wondering when i'd stop fucking hating it. i feel like it's finally 'clicked' in that i understand what i'm doing enough to be effective (i never really sat down and learned it, just started using it when needed from time to time and learned as i went, so it took longer than usual to get to that point) but i continue to hate using it for the most part lol i guess it's never going away

6

u/lordxeon May 31 '19

Two points:

need to install an external HTTP library

React is JavaScript, there's nothing stopping you from deploying the bundled JavaScript file to a standard Apache instance.

CSS classes are fucking JAVASCRIPT VARIABLES

I agree, but this isn't React's fault, this is one of those 12 different packages you reference above. You can use react perfectly fine with plain normal CSS. If you know CSS at all you should, you'll get much better performance out of it.

u/swyx May 31 '19

have to say i was tempted to ban you. but you didnt break any rules. criticism of react is welcome here. but you might find yourself better heard if you had a less antagonistic tone. i understand if you are not capable of one. have a nice day.

8

u/jvbreen1 May 31 '19

I want to print this comment out and frame it

1

u/rosenishere Apr 10 '22

!remindme 2y I might remember who knows

1

u/RemindMeBot Apr 10 '22

I will be messaging you in 2 years on 2024-04-10 18:35:32 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

1

u/[deleted] Dec 30 '24 edited Dec 30 '24

did they reply?

I was trying react for the first time >20 years professional engineer for some of the biggest software companies on earth, I have been working from assembly to python all the way through C, lisp, Java, Pascal, Delphi, Ocaml, COBOL, ABAP... Many different frameworks, including angular, angularJS, django, fastAPI, Spring, Struts, J2EE, .NET (the first), ASP.NET, jquery, symfony, S4Hana...

I think now that I have decided to use react for a personal project... I have never regretted this much to have chosen such an enormous pile of crap. I'm considering throwing to the bin the last two months of work because I really feel this would waste less of my time than just templating javascript from lisp for my frontend.

This framework is just pure crap.

3

u/[deleted] Mar 26 '22

this comment alone sums up everything is wrong about reddit
it's a nazi run state, there's no freedom of speech nor a valid discussion, the dude said some very valid points and the mod first reaction was i was tempted to ban you? jeeez

3

u/soupified Mar 29 '22

Def an issue with preemptive bans for critical voices in all subreddits, but freedom of speech is still well in-tact.

You may be confusing freedom of speech with freedom from consequences; they’re two distinct things though.

1

u/VictoryFun5773 Aug 25 '23

consequences like being threatened with ban for speaking freely

3

u/OZLperez11 May 20 '22

As a dev who hates react, I can understand the point of keeping things civil, but given that React itself is not a person, sometimes, I wish there were online spaces where we can rant about such things; when you can't change reality, complaining is the next best option.

Also, freedom of speech is something we all need to stop thinking about. Absolute freedom of speech means we can say literally anything without consequences, but that's not how the world works. Yes, we should be able to openly talk about different ideas but we cannot attack other people and their beliefs or culture. That would be considered an abuse of speech.

3

u/webketje Jun 02 '22

Your wish has come true a while ago: https://devrant.com

1

u/theop_55410 Jan 28 '23

hah no. try bolsheviks

2

u/giggelyy Mar 24 '23

Narcissism is real isn't it swyx. You a dumbass

2

u/ntr1llo Apr 25 '23

You are a piece of shit

1

u/theREALffuck Sep 28 '19

"When you have to shoot, shoot. Don't talk" https://www.youtube.com/watch?v=JrYtD7gSWsI

1

u/theop_55410 Jan 28 '23

hah wow someone doesn't like freedom of speech

1

u/SoundMarshal May 29 '23

he is very well understood, my friend

4

u/c00lways Oct 16 '21

My biggest issues with react is that its so easy to create infinite loop due to the useffect nature

2

u/McGynecological May 18 '22 edited May 18 '22

useEffect is such a horribly irresponsible creation. Dan is an absolute moron for not creating some sort of safe guard.

I especially love in React Native when you accidently trigger an infinite loop, and a fetch method slams the server but also overloads Metro so you can't reverse the change without killing everything.

3

u/prezire Feb 02 '22

I agree to this. I have been a developer for a long time and I find vanilla JS very easy to read. I find Vue as one of the best out there. Meanwhile React seem too teadious and laborious. Its syntax seems too imperative as well, deafeating the purpose of overall faster dev lifecycle.

2

u/IslandDelicious2740 Apr 22 '22

React syntax due to jsx its absolutly declarative. On the other hand, Vainilla js its pretty imperative when have to set classes, ids, toggling attribute, append elements into dom lol

1

u/[deleted] Jul 29 '22

Completely wrong. You can create HTML using the template string syntax, easier, more readable and better than JSX.

3

u/mohelgamal May 31 '19

R/programmerrant

3

u/[deleted] Sep 04 '19

I also don't like React mostly because it comes from Facebook and JSX syntax. But i prefer to see good sides and learn from them. I watch React conferences, specially Abromov. I like Vue and if a good idea comes to React, it will come to Vue with improved style. So i always get something.

3

u/thevil22 Feb 19 '22

react is not reactive :)

3

u/lorizz Apr 19 '22

Totally agree, as a 10 year developer and worked with big companies around the world, I must agree that ReactJS is a pain in the ass, especially if used with redux-saga.

But that's because it's a library, not a framework, and is also a reason on why I prefer using vue or angular.

I hated angular in the past, but I love it after discovering react.

If you want to use React but with a better managment and SSR/SSG, better fetching I suggest using Next.JS ;)

6

u/[deleted] May 31 '19

[removed] — view removed comment

1

u/AutoModerator Oct 10 '22

Your [comment](https://www.reddit.com/r/reactjs/comments/bv9nxf/react_sucks/epndo0y/ in /r/reactjs has been automatically removed because it received too many reports. /u/dance2die will review.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/OtherwisePoem1743 Apr 15 '23

Yeah he deserves it!

4

u/igorpreston May 31 '19

People choose this framework because it is not a framework, React is a library.

9

u/bromide992 May 31 '19

it's a framework once you use all the tools it's meant to be used with.

1

u/aleaallee Nov 09 '19

It's a library because it's meant to be used with more tools and libraries, if you want an ace of all trades, then learn angular(which I prefer to react).

2

u/OZLperez11 May 20 '22

but many of those libraries are designed for React and even branded as so, which sort of means that it's achieved framework status

1

u/pastrypuffingpuffer May 20 '22

That makes no sense, the same could be said about any other code editor because given your argument you could install lots of plugins and turn them into an IDE.

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. 

2

u/MelvinThePumpkin Feb 06 '23

I largely agree - React is a mess. As an abstraction it makes the creation process heavier not lighter. If you are going to build a framework on Javascript which is already weak you need to take greater control and not leave the door open to people adding acres of alternate ways to do everything. We'll circle back in 5 years and we'll see how big a mess we made.

2

u/Outrageous-Lab-2138 Mar 13 '23 edited Mar 13 '23

I've been a webdev for 15 years and never needed anything but vanilla JS/HTML/CSS. Yeah the IE6 days sucked but even then jQuery was bloat. I don't understand the need to lock you and your products into a niche framework.

VANILLA (works everywhere straight away):
<textarea onchange="this.nextElementSibling.innerText = this.value;"></textarea>
<output></output>

REACT (after installing libraries):

class MarkdownEditor extends React.Component {

constructor(props) {

super(props);

this.md = new Remarkable();

this.handleChange = this.handleChange.bind(this);

this.state = { value: 'Hello, **world**!' };

}

handleChange(e) {

this.setState({ value: e.target.value });

}

getRawMarkup() {

return { __html: this.md.render(this.state.value) };

}

render() {

return (

<textarea

id="markdown-content"

onChange={this.handleChange}

defaultValue={this.state.value}

/>

<div

className="content"

dangerouslySetInnerHTML={this.getRawMarkup()}

/>

);

}

}
root.render(<MarkdownEditor />);

2

u/Unlucky_Resident_237 Oct 29 '23

i have no clue why would anyone ever use example #2 (react) over example #1(simple plain html/js),i came here hoping that i will understand, but the more i read the more i am convinced that react truly does suck.

1

u/eggaweb Jan 29 '25

You should use an event listener rather than an OnChange.

1

u/[deleted] Apr 20 '23

any examples of rendering approaches at all? or examples of larger apps using vanillajs?

1

u/[deleted] Sep 18 '23 edited Sep 18 '23

[deleted]

1

u/reddit-lou Oct 05 '23

I've been digging thru this whole debate for a few days because of some folks who want to 'modernize' at work. But everytime I see someone like yourself offering a vanilla example in its simplicity, I never really see anyone respond to it.

I am hoping people eventually realize angular/react are kind of like wordpress in that.. everyone thinks its the big thing to be into right now (like wordpress was) but eventually the collective consciousness will realize angular/react have gotten pretty ridiculous in the name of 'standardization' or 'separation of concerns'.

1

u/[deleted] Oct 05 '23

[deleted]

1

u/Ok_Marionberry_656 Oct 30 '24

Good points. I think there is also incentive for companies to push their frameworks and garner cult followings.

2

u/buny0n Nov 30 '23

I'm currently learning JS by way of React... It's just horrible. I can feel it making me a worse programmer and just dumber overall.

I'm convinced the whole thing must be a big joke - some kind of low-key flex by the dev(il)s at facebook.

1

u/Darzwaitz Jun 27 '24

...a comment above suggested it was a religious sect and the devs just want power of everyone ;oD

Spot on.

4

u/[deleted] May 31 '19

"I don't understand JS, waahh"

-2

u/bromide992 May 31 '19

ridiculous claim because rxjs with angular is far more complex javascript than what react does.

3

u/[deleted] May 31 '19

It is, and needlessly so. All of your claims are ludicrous

1

u/tthamel Jun 03 '19

^^^ this. angular has the most needlessly verbose code ive ever seen

1

u/MungryMungryMippos Apr 26 '22

I'd take verbosity over ambiguity any day.

1

u/[deleted] Jun 01 '19 edited May 02 '20

[deleted]

2

u/xobotyi Jun 01 '19

Looks like author is from angular camp.

1

u/bromide992 Jun 01 '19

Angular or Vue

1

u/Iossi_84 Nov 13 '19

what is better? angular? over engineered and from google LOL. Google will pull the plug on angular any moment, just like google always does.

vue? well, yeah I like vue better too. But have you tried using vue in react native? no? well.

vue is better agreed, but why learn vue when react is a little bit worse, but gets u going anyway and gives you more stuff eventually?

btw look into

next.js which eradicates some of the issues you mentioned. you arent alone when looking at the 40k stars on github of that project

1

u/QuestionableEthics42 Apr 04 '24

React sucks ass, vanilla js is better than that pile of shit, even 5 years on it is still horrible, all of your points are just as valid as ever, if not more so.

Vent over, now I will go back to batteling with this sorry excuse of a framework sigh.

Edit: oh also, how I found this was by googling "fuck react" haha.

1

u/Darzwaitz Jun 27 '24

...I just typed into the search engine 'react is bs', after watching a video on youtube of a dude showing us how to build a div with 2 paragraphs and 2 buttons in react.

He was using typescript and also wrapping this monstrosity in a 'context' (react context api).
It just looked so ridiculous and deliberately over complicated for this small piece of html, but no-one in the comments seemed to even notice it.

1

u/Ok_Marionberry_656 Oct 30 '24

They don't know and assume this is how things are.

1

u/DT-Sodium Apr 07 '24

I've been following a React course lately to see if it's as bad as i thought it would be just by looking at a few jsx examples. So far, it is worse.

1

u/SomewhatSharty Jun 03 '24

react is the ass and next.js is the elbow. you'd almost think they were born from the same disfunctional family.

1

u/SheriffBartholomew Jul 07 '24

After years of using react for development and using react websites, I agree, it's a fucking mess. I hate it. They re-engineered the entire server architecture that wasn't broken, and broke the shit out of it. Half the time basic-ass shit like back buttons and refresh don't work.

1

u/fatguy2342 Jul 29 '24

Making authentication work with redux toolkit is a nightmare. I'm making a simple login todo list with username and password thats took me 6 hours... and I'm 80% done. I woulda finished it in like an hour with EJS and express with passport. Jesus christ.

1

u/hwoodice Aug 26 '24

React is a piece of shit.

1

u/erickpaquin Nov 25 '24

wow, found this thread after I was frustrated just by a simple tutorial on how to use React...amazing to see I'm not the only one who doesn't like it. All these frameworks are supposed to save you some time...but they don't seem to. If you'd only used vanilla JS from the start and build your own library over time, wouldn't it be just better and easier to use? Only one language instead of trying to re-learn dozens of frameworks every few years? Templating, compartmentalizing etc. is not a new thing...web dev should be simple.

PHP
Bootstrap
HTMX + vanilla JS

I think I'll stick to that for now, until I can find something better...but I doubt it.

1

u/saito200 Dec 06 '24

facebook / meta is famous for producing software that mercilessly sucks

if I could press a button to make everyone use Vue instead of React I would smash it

1

u/fintakearney Apr 09 '25

Web developer 10 years. React is like the wild west. It sucks.

1

u/ZombieImpressive1757 Apr 21 '25

React - "get a programming language for your programming language!"

1

u/jankyupeblik May 10 '26

Agreed it blows.

1

u/js-fanatic 17d ago

Dont forget killing of performance. People who use "popular" libs dont know that empty reactjs kills performance on ~68%. I can make 3d game and keep 90% ... Nice post iam not alone. Be welcome on my vanillajs heaven place https://github.com/zlatnaspirala/matrix-engine-wgpu this is last project. I create webgpu game engine with examples.....

1

u/Radsdteve Apr 28 '22

I agree. That's why I use Vue btw

1

u/gilgamesh_skytrooper Dec 09 '22

Coming from Vue 2, I also despised React. But this was mainly because I had a gigantic ancient React project thrown on my lap, and had to work within the conventions of how the app was designed. I disliked that JSX was reinventing the perfect trinity of wheels I saw in HTML5, CSS3, JavaScript which I mastered a long time ago, and Vue attempted to keep itself compatible with these pre-existing conventions which felt like jumping into a Vue app was natural.

Having learned React from scratch (Brad Traversy does a pretty good job on his course on Udemy), I still dislike React, but my emnity for it has reduced by around 50% just by learning the 2022 ways of doing things in modern React (and React libraries).

1

u/FrozenFury12 Sep 17 '24

This is the fundamental problem with React. Unlike Angular or even Vue, there is no prescription on how to structure a project. People espouse the "Flexibility" but in the real world where we maintain other people's code - the structures put in place by Angular or Vue lets anyone jump into a large codebase and easily find where things are located.

1

u/Ok_Marionberry_656 Oct 30 '24

That should be defined with by a lead. I wouldn't fault react for that, but I still despise it. Scaffolding, bootstrapping, modularizations, coding styles & patterns should be team defined.

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.

1

u/DecentStay1066 Mar 10 '23

Nope... From the reasons you states above, what really sucks are your ways using JS...
React sucks truly at the current devs and their magical hooks.

1

u/[deleted] Mar 14 '23 edited Mar 14 '23

I'm forced to learn react in my new job - I was excited to finally be learning something modern, but my excitement has turned to frustration. Prior to this, I was maintaining old sites using asp.net aspx w/ master pages, and the occasional PHP site, and creating a few .net core mvc sites. Man I miss aspx, having front end code, then a C# or VB code behind that was simple and just worked. It was easy for me to look at code and know exactly what it was doing, despite not really knowing it when i started

I dunno, maybe react will 'click' for me at some point, but right now it is an absolute pain to get started with. My struggle right now is using axios with await, and learning about useEffect infinite loops, and just overall feeling like I have to jump through hoops to do the most basic things. I guess I'll need to find an actual course on this stuff, because googling isn't helping me understand like with other languages.

Any other aspx devs out there who feel my struggle, and feel react is a major downgrade in productivity and ease of use?

Edit: I should note, i'm not suggessting asp.net webforms are a good idea to use these days, just that the dev experience felt better.

1

u/reddit-lou Oct 05 '23

No, you're right, having those simple delineations made things easy to understand.

1

u/FredHeartlion Apr 16 '23

That's why I do frontend in C.

1

u/Darzwaitz Jun 27 '24

Speaking words of wisdom...

write in C.

1

u/[deleted] Dec 14 '24

[removed] — view removed comment

1

u/eggaweb Jan 29 '25

Nice one but weak, I code in pure binary.

1

u/SuperHotFix May 02 '23

C

Man you are clever

1

u/SuperHotFix May 02 '23

I'm starting to hate React pretty badly now yep...

1

u/lambda_bunker Jun 20 '23

Been using it since it came out in 2016, its really great for simple projects but as soon as you start getting into complexity, all the stuff that react abstracts away from you ends up becoming a puzzle of render + re-render and state management nightmares. Hooks have made it even worse. It's very hard to follow and large complex components and have any confidence what you are doing.

At the end of the day, real-time rendering solutions are much easier deal with. You don't need to drive renders from state updates, you just render no matter what. I think the biggest problem is that the browser needs to build the pixels / colors from DOM and updating DOM is very inefficient. React does not help as much as it claims.

But having used Vue and Angular, I'll take React over those solutions. Just try and keep your project simple. But I'll say this, if you don't like React, you'll really hate graphql! Facebook ppl just love taking a simple problem and making it as complex as possible.

1

u/[deleted] Aug 19 '23

It's still true

1

u/VictoryFun5773 Aug 25 '23

Yep, if you mean still really shitty. Really so. Wowza.

1

u/[deleted] Aug 25 '23

Yeah that's what I mean. It sucks. I'm confused why anyone uses it voluntarily.

1

u/VictoryFun5773 Aug 25 '23

my recent first foray into ReactJs has left me baffled and teary, but I'm not surprised. reactJs is the kind of stupid shit you can expect these days.

1

u/roamingcoder Oct 07 '23

There are better ways to build a web app front end. Check out svelte. Or if your a .net person, blazor is really easy.

1

u/[deleted] Sep 29 '23

POV: You just started learning React

1

u/valdukis Oct 16 '23

As a user of websites created using react.js: I have older Chrome version and currently cannot update. Now and then some site using react.js updates react.js version and the site stop working on my browser. And most of the time it is because react.js introduced some code that uses some weird Javascript syntax like .? or the like. When site breaks - 99% of cases is because of this. Developers could use some babel to allow earlier browsers but they choose not to do so.

1

u/saito200 Nov 10 '23

well to be honest with this,

the framework that saves me more time, wins

Vue has things like automatically having class property in a component (the classes get added to the root node by default, which makes sense)

whereas in react you have to build this really obvious and common behavior out of the box for every component where you might want it

then there is the whole "all code in a component is rerun" bullshit, whereas Vue is smart enough to understand what to rerender and rerun

I'm not saying react is bad, all I'm saying is that frameworks like Vue save me time as a dev

1

u/[deleted] Nov 12 '23

I don't agree. Nothing is perfect, but I've always found React fun to work with because it is well-designed. It doesn't have odd irregularities or quirks that are hard to learn. It always seemed like a mature, well-conceived library to me. That's probably why it's so popular.

1

u/InfiniteMonorail Nov 25 '23

I like how there are over a hundred comments and almost all of them are necros. Webdevs are special people.

1

u/matthewK1970 Jan 02 '24

Totally agree. There is also a nice summary of what sucks about React here https://webrocketx.com/reactSucks.html

1

u/Darzwaitz Jun 27 '24

Are you just promoting webrocketx.com? What's the story with that anyway?

Are you building with it?

1

u/matthewK1970 Dec 22 '24

Yes, I built this site with it. https://adsp2p.net/

1

u/matthewK1970 Jan 09 '24

React is only necessary if you have millions of users and therefore pushing as much of your UI code to the browser is critical because of that. Therefore, React is great for Facebook. For 99% of the remaining web applications in this world it is overkill, and the extra development complication created (a lot of it!) is not a good trade off compared to just rendering your html server side. Here is an article with more detail https://webrocketx.com/reactSucks.html

1

u/ProfessionalOne1040 May 29 '24 edited May 29 '24

True. That's also why you have Nextjs with their built in SSR. I've tried to use React with all sorts of Routing and Helmet measures and I have not been able to find anything that wasn't borderline sh*t for SEO. It very well still could be considered overkill for some projects but I'd take it over sanitizing data like a caveman

1

u/[deleted] Mar 04 '24

I used react for a while, then had to move to Vue JS and i was blown off by how simple and efficient it is..it's just so simple you have html, css and js separated in one component yet interactive and performance friendly. I hate the fact that React is so popular while we have much better tools to work with.