DEV Community

Cover image for You don’t need React for building websites
Silvestar Bistrović
Silvestar Bistrović

Posted on • Originally published at silvestar.codes

You don’t need React for building websites

Here’s what I think: if you are building websites, you don’t need React (in most cases).

I have been building websites for over nine years now. As I get more experienced, I use fewer libraries and frameworks and rely on good old HTML, CSS, and vanilla JavaScript. I think you should consider doing the same.

My rant about React

Ever since React came to the stage, I’ve been hearing, reading, and watching how great it is. I had a few attempts to learn it, but I failed every time. It is fair to say that I don’t understand it, so I cannot even rant about its features, shortcomings, or flaws.

What I can rant about is the hype. I mean, it’s not even hype after all these years. It is a necessary evil. Of course, I am exaggerating here, but maybe not.

I feel like 9 out of 10 job ads for a frontend developer mention React.

I don’t get it. Why would I need to use React if I am supposed to work on building websites? Are employers afraid that if you don’t know React that you wouldn’t be able to make a landing page? Would knowing React help you solve any problems when creating a new layout or template? I cannot think of any part of the website that would require React.

All these questions made me realize that I don’t need frameworks for my everyday work.

There might be a solution

Instead of adding React to every frontend job ad, employers should emphasize HTML, CSS, JavaScript, and accessibility skills. These four amigos are the only thing you need to make websites perform well, achieve a solid SEO score, and allow every user to consume the content.

Brad Frost wrote about front-of-the-frontend. Chris Coyier wrote about the great divide. I agree with both of them, but I would make the following distinction: web app developer and website developer.

The web app developer does need React or similar frameworks.

The website developer doesn’t need React or similar frameworks.

Of course, there are exceptions, but I am talking in general here.

I am in a situation where I don’t need to apply to new positions and choose my employer often, but I keep my eye on job ads frequently. I sympathize with developers who are capable of building solid websites but struggle to find a job because of the lack of React skills. I know at least one person who would be thankful if React skill wouldn’t be listed so often — a friend of mine (and my mentee) with whom I share the office these days.

I propose a simple solution: if the job is about building sites, please stop adding React as a required skill unless absolutely necessary. It might be helpful to use the website developer term, too.

Conclusion

Knowing React could only make you a better developer, and I am not saying you shouldn’t learn it. However, I am saying that it is not needed in most cases if your goal is to build websites.

I hope more people would realize how powerful HTML, CSS, and JavaScript are and that these come with the most features that you’ll ever need for building a website. Simpler is usually better.

Latest comments (148)

Collapse
 
tsykin profile image
Aliaksandr Tsykin

The biggest irony is that this website runs React JS (used "WhatRuns" plugin to check)

Collapse
 
efpage profile image
Eckehard • Edited

Using pure HTML, CSS and JS may give you some headaches, if your project grows. This is mainly caused by the conceptual weakness of HTML, which was not designed for the things we do today. Do you think, its possible to create any website or web-app without the use of HTML?

In fact, it is! The html-dom-api exposes alle the functionality of HTML to javascript, so using HTML is actually a detour around creating your page content. About two years I tried this approach with the DML-project, first as an experiment, but it came out to work pretty well. In the meantime, several projects have been finished, from simple websites to more complex applications. Using JS on the DOM directly is quite fast and gives you new options like "strong encapsulation" without the overhead of a massive framework. A DOM element created within a JS class object is just exposed to this object, not to anything else. This is one of the many advantages.

In any case, this is an interesting approach you can check out, the project is open source and can be used for free. It was already presented on dev.to some time ago. So I appreciate your comments.

Collapse
 
adrielzarate profile image
Adriel

Like 10 years ago it was the same, but with Wordpress.

Collapse
 
manuartero profile image
Manuel Artero Anguita 🟨 • Edited

(A quick side note): React isn't a framework but a library. Subtle (but relevant) difference. Next is a framework. React isn't controlling the boot of nothing. It's a library.

Apart this nitpick, I do agree with this post. Totally.

--
s. A guy developing in React

Collapse
 
stevepy profile image
Steve Py

Like the classic Regex quote, I often see the same applying to JS frameworks/libraries like Angular and React. "If ever you face a problem that you think 'A Javascript Framework would solve this!', now you have two problems." The simple truth is that the likes of Facebook and such led to the creation of React because the developers had reached the limits of what they could do with the tools at hand and the scale of the services being built justified building and standardizing on an approach like React.

99%+ of websites out there in the wild, many of which are pursuing being built with React, or probably better phrased, despite React simply don't need it, or don't really benefit at all from it. The major issue with frameworks and libraries is that by nature they expose your solution to dependency hell. You either freeze versions, or you are spending a noticeable percentage of your time dealing with dependency conflicts, regression testing and the FUD that comes with each time dependencies in your solution update.

All too many projects out there are poorly written by teams that struggle to grasp fundamentals of stateless application design. React/Redux, Angular represent standards and patterns to build large, complex systems, surely if we use those our application will automagically be "better"... Except you cannot expect to fix problems due to inexperience by adopting technologies that you know even less about. But the teams persist digging themselves into holes, projects fail and fal behind, and the "solution" is invariably go out to hire React/Angular experts that will get them out of the hole by digging faster.

Understanding React/Angular is fine, and hopefully you find a job/client that is using the libraries and frameworks for a legitimate reason. The sad truth is that most of the clients and employers out there using these tools don't need them, and the experience working with them there is simply a bloody headache. When I'm working on corporate systems that have less than 500 users and I see discussions to use React or Angular, I just shake my head. It's a classic case of YAGNI. It's a completely different story to a public facing service with ambitions to reach 1M+ users.

Collapse
 
rleddy profile image
Richard Leddy

I started using Svelte. I got stuff done pretty fast, and I was able to do most of what I wanted to do with a nice ease. copious-world. Maybe someone wants to contribute.

I used a set of components OAT some years ago. It was pretty good. But, every stared using jQuery. And, OAT hasn't changed much in a long time.

There are some frameworks that are just better than others. In particular, you can get benchmarks on running the frameworks. React and Angular are sort of big and slow.

In the end, you can see that WASM based pages do things faster.

And, yes all of that has to do with web apps, not the pages. I started writing a page generator that makes a fairly static page. But, some parts of the page are left of for lazy loading. Maybe the code that manages the lazy loading is sort like an app, but I am fairly sure it doesn't got that far.

I my mind, a page gets a certain amount of use or interest. If the user can begin to load parts of things that he is interested in, then the page can slowly build into either his desired view, or that his page can slowly become a web app. But, his first experience with the page will just be a static page that tells him something he wants to know.

Collapse
 
benjaminv profile image
benjaminv • Edited

To some extent I agree.

Collapse
 
stevevail profile image
Steve-Vail

Thank you! I have attempted to learn REACT numerous times, every time falling short of being able to actually use it. I'm currently not looking for employment, but when I was, I hated seeing that 5 letter word in the their job requirements.

Collapse
 
owenmelbz profile image
Owen Melbourne

@starbist The key puzzle piece you are missing is "the eco system" - It's not React itself, it's what it affords you to be able to do. e.g. Tools like NextJS are React based, React Native is React Based, hundreds of top quality libraries all require React.

Yes it's not needed - BUT if you choose to use it, you get access to the eco system which opens many doors.

Collapse
 
anders profile image
Anders

Not only don't you need it, you more than likely shouldn't even consider it.