Picture of a wall of code because it’s a pretty picture to open a general programming blogpost

React, the Pros and the Cons

Sharad Satsangi
Nerd For Tech
Published in
4 min readMay 31, 2021

--

The other day I was having a job interview with a cloud engineer and he asked me a question that I hadn’t really considered before.

“Sharad, what are the best reasons to use React, and what are the worst?”

It’s a good question. I hadn’t really thought about it till he asked me. I jumped through the hoops at a software dev bootcamp and came out very comfortable using React, but, until that moment, I hadn’t really stopped to think about why React could be an excellent choice for a junior developer and why it might also be one to miss.

Since then, I’ve checked out a few lists on Google. Of course, there’s a lot of overlap. What surprised me is that these lists don’t really cover much of what I think the pluses and minuses are. I wonder if it’s my perspective as a junior software dev that colors my view, or if it’s because of my experiences making deliverables on a tight budget in crews composed solely of junior devs?

Buzz Lightyear telling Woody about React’s reliance on components to design amazing apps

The Pros

Open-source and sporting a huge developer base, React.js is very easy to learn. Communities of developers actively help newcomers with problems both mundane and unique. When you consider the extensive range of component libraries available for React, it’s clear that React is a powerhouse for fast application development.

React’s programming paradigm, developing components that are independent and reusable, is an extension of the Don’t Repeat Yourself programming principle. With a little practice, a thoughtful developer can make components that can be re-used over and over in one application, or even across many applications.

Since React.js is so easy to pick up and can be used to develop production applications, a business can staff themselves with Junior Developers to handle large parts of the development process. Of course this isn’t just a potential to save overhead, it’s the potential to have junior devs gain valuable development experience quickly, increasing their value. It’s a win-win.

There are more pros of using React, for example: the way React is rendered makes it very friendly for SEO, the freely available in-browser development tools, and how easy it is to implement unit testing, But my goal here isn’t to make an exhaustive list, it’s to tell you what I personally love about React.

Someone surprised they’ve painted themselves in a corner, and surprised they are painting the floor to begin with
More than once, React has let me paint myself in a corner

The Cons

My main complaint with React is that there’s not a single way to implement the paradigm. Directory structures, naming conventions, even component libraries are not standard and can vary wildly from project to project. In an unmanaged group of devs, this flexibility can easily give way to chaos. In my short time developing React apps, I’ve seen labyrinthine directory structures, esoteric component libraries, and naming conventions being thrown to a side. While all these problems stem from breakdowns in communication, React endures them. This creates projects that work in the short term, but become nightmares to support in the long term. What should be an app that requires minimal time to update and develop new features for can end up requiring more time.

I see this complaint, that there isn’t a single React-way of Doing Things(tm), echoed in other people’s criticism of React when they say that React is poorly documented. However, I disagree with that criticism. I think that React has some decent documentation. React is flexible enough to support so many different ways to implement the same components that often the React documentation isn’t enough to decipher another developer’s code.

So … is React Good or Bad?

In this week’s blog we looked at what I personally love about React and what I’m not so crazy about. React is a great way to quickly go from knowing very little to creating exciting new applications. Like JavaScript, it is also super flexible as a paradigm, which can be great in the sense that there are many correct ways to implement React, but be careful! That same flexibility is also enough rope to hang yourself with.

What is your opinion on React? Do you prefer another framework instead? Leave me a comment, I’d love to hear your thoughts! Happy coding, I’ll catch you next week!

--

--