Stop Using React
Tags: react, webdev, javascript
Published: 2020-09-15 21:21:31

I thought I simply didn't understand React. I taught myself React and I still wish I could go back in time and make it like React never existed. Here's why.

<h2> 1. It's slow </h2>

<p>
        <img alt = "mobile" src="https://dev-to-uploads.s3.amazonaws.com/i/61wy5nckh5bqdcxn307q.png"/>
     <em>source: tim kadlec</em>
<br>
</p>

53% of mobile users abandon websites that take longer than 3 seconds to load. For every additional second a page takes to load, 10 percent of users leave. [Performance is user experience.](https://dev.to/wgolledge/an-overview-of-performance-in-javascript-applications-2obb)

[Also read ](https://aerotwist.com/blog/react-plus-performance-equals-what/)[this](https://css-tricks.com/radeventlistener-a-tale-of-client-side-framework-performance/).

## 2. It's expensive

Put your React app into this testing tool: [https://whatdoesmysitecost.com/](https://whatdoesmysitecost.com/). 

Do you care about people who can't afford to pay for expensive websites on their data plan?  

A [lot](https://timkadlec.com/remembers/2020-04-21-the-cost-of-javascript-frameworks/) [of](https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4) [people](https://macwright.com/2020/05/10/spa-fatigue.html) have discussed how expensive JavaScript frameworks are, but it seems developers don't care about reaching all their potential users. I'm not the first person to make this point, but it seems like the message isn't getting through. Do you think some users are more important than others? Do you care about reaching <em> all </em> users or only the wealthy ones? 


## 3. It's inaccessible

Hundreds of millions of users access the Internet from [feature phones](https://en.wikipedia.org/wiki/Feature_phone) with a 2G connection. When you load all your JavaScript onto a feature phone, all the user sees is a spinning wheel.

There's so many [articles](https://dev.to/addyosmani/loading-web-pages-fast-on-a-20-feature-phone-8h6), [tools](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers), and [frameworks](https://preactjs.com/) that help you develop for these users - but developers scorn them. Within the [JavaScript](https://www.reddit.com/r/javascript/) subreddit, [web](https://www.reddit.com/r/javascript/comments/cv56c9/should_you_should_be_using_web_workers_hint/) [workers](https://www.reddit.com/r/javascript/comments/f9i6gx/for_what_do_you_use_serviceweb_workers_is_it/) [are hated](https://www.reddit.com/r/javascript/comments/2pflmp/has_anyone_actually_found_good_uses_for_web/), even though [they are one of the best tools we have](https://surma.dev/things/when-workers/) for effectively developing apps on feature phones - scratch that, for all users!

If your app is fast on a feature phone, it will be blazing fast on an iPhone. <strong>When you develop with all users in mind, it improves the user experience for <em> all users</em>. </strong>

## 4. React goes against what the web was made for

Here's the general idea of React: you download all the JavaScript a website needs for like, seven seconds in a row without showing anything, but once you do that, you never have to download resources again, because you've made a single page application.

Is this how websites are supposed to be?

<blockquote> "The web is a streaming thing by default. You go to a page and it serves HTML. You'll start seeing it as it's downloaded. Same with images, video...You can do something with just a little bit of the response." - <a href="https://invidious.snopyta.org/watch?v=G9PpImUEeUA">Jake Archibald</a> </blockquote>

The Internet is a stream. React is not. I see it like this: <strong>React fights against the natural flow of the Internet.</strong>

Ditch React and become friends with the web. It's a <em>web,</em> interconnected, with resources coming from everywhere. Web apps are not like native apps that take 30 seconds to download before the user accesses the content. Stop treating webpages like native apps.


## 5. It's made by...those people
 
Just read this [Wikipedia article](https://en.wikipedia.org/wiki/Lawsuits_involving_Facebook). No, it's more than you expect.

<hr>
- [Further reading.](https://infrequently.org/2018/09/the-developer-experience-bait-and-switch/)
- [More reading.](https://macwright.com/2020/05/10/spa-fatigue.html)
- [Recommended viewing.](https://invidious.snopyta.org/watch?v=4bZvq3nodf4)