DEV Community

Discussion on: Stop Using React

Collapse
 
markohologram profile image
Info Comment hidden by post author - thread only visible in this permalink
Marko A • Edited

First of all, let us be honest here. You used React to get more clicks. This "article" could have been titled "Why you should stop using Angular/Vue/Svelte/Aurelia/Ember" or any other JS framework.

1 It's slow

You list the source for that image, but don't actually link to the source. How can I know where is this image actually coming from? Wasn't "web made for this"? Linking to other pages and there you don't do that basic thing?

EDIT: Forgot to add that React isn't really slow, but apps created with it could be. That could be said for any framework/library, if you build a slow app it will be slow no matter what you use.

2 It's expensive

What about other assets? Images, videos, CSS? Those aren't expensive, right? Average website will have you download way more KB/MB in other assets compared to JavaScript. It's just that JavaScript will also use some more CPU time because it has to be parsed, but this point isn't about performance it's about bandwidth cost and in that case 1MB of JS === 1MB image

3 It's inaccessible

I kinda agree with this point, but for those same users an image heavy site is also kinda inaccessible, so it's not just JavaScript, it's whole page "weight" combined, but JS does have that extra parsing step compared to images for example.

4 React goes against what the web was made for

Web isn't what is used to be. Web isn't just static HTML pages that are connected with links anymore. You do realize that web has evolved far beyond its initial idea?

5 It's made by...those people

What search engine do you use? Google? Bing? Yeah, that is made by "those people".
What browser do you use? Chrome? Yeah, that is made by "those people".
What car do you drive? XYZ? Yeah, that is made by "those people"
This whole point is pretty stupid in the end.

Tell my why you like React in the comments! I'd like to understand why people enjoy using it.

Because it redefined how we write and think about web apps. Because it has a nice API and it's fast. It encourages consistency with components. Developer experience is also top notch and when developers enjoy working with tools, we tend to write better apps because we just enjoy the process more. React just brought a lot to the table since it was first released and shifted the mindset on how we approach frontend development.


To be honest, this whole article feels seriously low effort because you didn't include a single "solution" to all these "problems". You just list some random stuff and that's it, there is really no real value in anything you say here.

I agree that modern web apps can be bloated, but apps are doing more and more in the browser today than ever before and it's not like apps made previously with jQuery or Backbone or AngularJS weren't big, it's just that they maybe didn't do this much work as we do now in the browser.

Even if you go with using vanilla JS only, you will eventually make some kind of "framework" yourself because it won't be easy to handle a decently big app with vanilla JS. I mean, if you don't write some type of internal framework and you just start all over again on each project, what are you even doing?

Collapse
 
ender_minyard profile image
ender minyard

timkadlec.com/remembers/2020-04-21...

(other claims already addressed in article + comments)

Collapse
 
markohologram profile image
Marko A

Huh, kinda disappointed with your answer. I expected more...

Thread Thread
 
ender_minyard profile image
ender minyard

Images and CSS are not as expensive for the end user as JavaScript. External links in the article explain this if you did not know already.
You need to go back to basics. Is that the attention you wanted from me 😛

Thread Thread
 
markohologram profile image
Marko A

You are talking about cost from a bandwidth (download) perspective and in that case 1KB of images is the same as 1KB of JavaScript. I know JavaScript has additional cost because of parsing, but that is performance cost, not bandwidth.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
markohologram profile image
Marko A • Edited

Are you serious? You don't know a single site that ships few images that amount to few hundred KB? Just open any news site, open an average blog etc.

And regarding that 139KB (React 0.14.5 + React DOM) you mention from that URL, make it more like 97.5K (React 16.2.0 + React DOM) because who the hell ships React 0.14.5 these days? And those are not even gzipped sizes, but minified js only without gzip. That list you sent shows gzipped size of 31.8K which is more realistic. I mean, you turn on gzip right?

You have got to be trolling at this point and I'm just dumb for falling for it.

EDIT: Nice job editing your comment above this one so this comment kinda doesn't really fit as an answer...

Thread Thread
 
ender_minyard profile image
ender minyard • Edited

It's okay. You can stop using React whenever you feel like it.

Thread Thread
 
nrutledge profile image
nrutledge

ender minyard is definitely trolling. This very page with a tiny handful of images is shipping nearly 100 kb of image data, which is 3x more data than gzipped React + React DOM.

Thread Thread
 
ender_minyard profile image
ender minyard • Edited

I'm very glad that you made an account to comment on my post. Welcome to dev.to 🤠

Thread Thread
 
nrutledge profile image
nrutledge

Thank you. It has been fun reading through your article and everyone's comments. I like when people have differing opinion. Keeps things interesting. :)

Collapse
 
adriangrigore profile image
Adrian Emil Grigore

What do you mean by "low effort"? Also I invite everybody to use my nojs static site generator who goes with the original ideas of the web: mkws.sh.

Collapse
 
markohologram profile image
Marko A

Person writing this "article" didn't even invest any effort to properly elaborate each point and potentially offer a solution for any of them.

It looks like a low effort clickbait article that just used some "cons" listed from somewhere else and doesn't really offer any value and it's just a waste of time to read it to be honest.


I guess you aren't really even interested in me answering this, but primarily wanted to promote this site you have. One suggestion is to work on the design of the site and limit the width of content because on fullHD monitor it's hard to read and is hard to use overall.

Thread Thread
 
adriangrigore profile image
Adrian Emil Grigore • Edited

It was both! Why is 'investing effort" a good thing? Isn't honesty effortless?

I don't have access to a fullHD monitor, but thanks for the suggestions.

Thread Thread
 
markohologram profile image
Marko A

Hmm I don't really want to get philosophical here, but if you want to attack something like this online you should at least invest some effort into writing a proper article, not something like this we are discussing here.

Collapse
 
sainig profile image
Gaurav Saini

Whoa, solid dialog you got there!

I also like react, it is very easy to get started with even for junior devs. But one reason that I don’t like react is that nowadays people don’t use it the way it was meant to be used. It’s small and loaded with features, but people are not satisfied with that. I see more and more people try to turn react into something it’s not. People hear about fancy buzz words and immediately jump on the bandwagon of things like dependency injection, service architecture, etc. when all they end up with is messy code and nothing else. I think it is a futile effort to turn React into something close to angular (being a backend dev this is closest analogy I can make), and I don’t remember how many times my suggestion “if you like the features so much why not use angular, you won’t come close to the quality with which things like these need to be implemented and still meet the deadlines” has been put down with the reason that angular is very big and slightly less popular than react (yes, that is an actual reason I had to hear)

I haven’t got anything against anything, but I cringe a lot when people use things not the intended way, apologies for the poor analogy but you can’t hammer a nail using a sword, this doesn’t mean that a sword is useless.

Collapse
 
ozzythegiant profile image
Oziel Perez

You're right. We can say the same thing about Wordpress too. That's a blogging tool but instead people try to use it for things it was not built for (apps, e-commerce, full site building). So just like I'm taking a stand to stay away from Wordpress, I'm making a stand to not use nor recommend react for anything else in the future.

Some comments have been hidden by the post's author - find out more