Why the hype of React?

I have been a developer for several years now, and between the 3 most popular frontend frameworks/libraries (React, Angular, Vue), Vue is by far my most favorite of them all.

I just don’t like React. Never have. My biggest complaints.

  1. I hate the whole JSX approach. Mixing html-like syntax within JS is just gross.
  2. Global state management is too complicated and verbose, especially when using Redux and introducing asyncronous code.
  3. From my knowledge, styling components becomes difficult, especially when you need to use pseudo-selectors and at-rules.
  4. Having to rely on 3rd party solutions for things like routing and state management.

My biggest complaint on Angular:

  1. Upgrading through multiple major versions is a nightmare, and major versions are released every 6 months.
  2. Too opinionated. There is an opinionated approach even for making an http request.

Yet, what I don’t understand is why Vue jobs are so scarce. Yes, I know Vue doesn’t have the backing of major tech company, but the developer experience is so much better. You have official libraries for state management (Pinia) and routing. I actually like the concept of composables and the composition API.

Edit: the reason why I am complaining is that just about all jobs I have looked at want extensive React experience. My former company I worked for is considering switching from Vue to React because they are struggling to find Vue developers.

you know i was depressed when i hear one company which give small salary for internship uses vue framework because i only know react and i was very interested to get experience in my internship this semester with this company and i did not get time to read .also i can not find any website like freecodecamp to learn vue with a certification accomplishment.and now your are telling me that vue is easy as compared to react and angular.i am really motivated,i am coming for you vue.thanks for the info

1 Like

First, React isn’t neccessarily supported by hype anymore. Its become nearly an industry standard for any situation where you want to render a UI using web technologies. That’s React’s bread and butter, and it doesn’t go much beyond that.

There are subjective and objective reasons. For example, liking or not liking JSX is mostly subjective reasoning. This doesn’t mean it isn’t right or wrong, only that its mostly up the individual to decide.

I’ll focus primarily on the objective reasons why React has become the most popular, and why it will stay the most popular option.

The primary driver of most of the objective reasoning is actually company driven, not developer driven. Namely companies as a whole get to pick their tech stack. This automatically leans into picking “industry standards”, most of the time unless there is a distinct reason to pick something else. This is key, as the three major frameworks are essentially interchangeable from an end user perspective.

Objective reason #1:
Its the most popular.

This might be kind of obvious, but by picking the most popular option, you automatically get a bunch of advantages. Namely, the biggest ecosystem, the most developers, and the most support from the community. Picking a smaller/less popular option limits all of these, and thus increases risk for the business.

Objective reason #2:
Its only focused on the UI aspect.

Its agreeable Angular is very opinionated, as its goal is to make as many choices out of the box for you. You could change it out to build your own solution, but most of the time it makes sense to stick with what is already given, unless you have a clear reason to do something else.

React on the other hand is actually very limited in scope, which is one reason why it labels itself as a library and not a framework.

This is an objective reason for companies to pick this framework because your actually picking a “small thing”. Its true you could warp any of the major frameworks however you see fit, but React is the most flexible in that area since it only focuses on 1 aspect of the entire stack. Companies can decide their own risk in regards to using it. Use Redux, or make your own, or don’t use Redux, or even use React on the server-side, its all mostly up to the company on which route they want to take based on their needs.

Objective Reason #3
It has the best ecosystem.

Due to the above two reasons, React ends up with the biggest, and most expansive ecosystem. If you look for any front-end technology, odds are it has some relation to React either directly or indirectly. Not only is this because React by itself doesn’t actually do much, but because you can easily build “around React” for multiple use-cases.

This also means you end up with “spin-off” technologies that leverage React, such as Next.js. Any front-end technology will provide the best support for the most popular options, thus making React support paramount most of the time.

Finally, this leads to the single most important reason about the “hype” and answers why there are mostly React jobs.
Its the least risky option for a business.

Simply put, a company only cares about picking the best/safest/most-standardized technology most of the time. Unless there is a specific reason or incentive to pick something else, most will just go with whatever is the standard.

Its very hard to argue against any of the three front-end framework because ultimately all of them compile down to HTML/CSS/JS, so how you get there is generally not as important as the end result which usually ends up being nearly exactly the same.

This is further drawn out as the differences between the frameworks is actually rather minimal:

  • All of them use component based setups
  • All of them need to be compiled down to target HTML/CSS/JS
  • All of them can support similar bundlers, webpack/esbuild/astro/etc
  • All of them provide some sort of state management out of the box
  • All of them support modern JS stack technologies, such as SCSS, TypeScript, and modern syntaxes

I’d reconsider “picking a side” and think more about seeing the similarities between all the options. React has the most options and is the most popular, almost because its the most popular.


Nitpicks:

Angular’s CLI provides direct code migration through all major and minor versions out of the box via ng update (ref). Yes there are breaking changes made in the framework in some versions, but I actually don’t know of a framework with first-party migration support. If Angular had any single strong-point, its the first-party tooling and support. I’ve used multiple frameworks, and this level of support is really are. It really is an industry leader in that space. Its also worth keeping in mind the open-sourced version of Angular is the “diet” version, as the internal version used in Google actually uses an entirely different builder.

Its also worth pointing out Vuejs is actual somewhat a spiritual cousin of Angular.
Angularjs (or Angular 1) is currently unsupported, but Vuejs took a lot of inspiration from Angularjs, and made it better. Angular doubled down on a number of aspects, such as rxjs, TypeScript, that weren’t in Angularjs, but both frameworks come from a similar mindset.

I’m unsure if dinging React for being unopinionated and then dinging Angular for being opinionated is reasonable. You could bypass Angular’s out of the box solution for http requests and use whatever you’d like. Its true Angular is opinionated in a bunch of facets, but it is also the most “open” and expandable of the three due to not being focused on the UI at all. As the docs say its focused on “application development”, the UI is just one element of such architectures.

Its to the point there are people have experimented writing Angular using jsx. However most of these efforts die out due to the workload required, some do stick around such as Nrwl’s nx technology which took Angular’s tooling and super charged it to support other frameworks.

This is the risk taken with picking a less common framework/stack. Unless there is a clear-cut reason for “not sticking with the group”, your inheriting risk. This risk is starting to show.

At the same time, as a Vue developer you could leverage this fact and become more of an “expert” and be able to bypass supply and demand as one of few who could satisfy demand. This might not work though, because ultimately as I mentioned before the difference between switching between React and Vue (or even Angular) isn’t actually that much of a change for better or worse.

PS. I’m an Angular developer who moved to learning/using React for work. The jump was very minimal, I’m sure you could pick up any of the other frameworks if you have a good amount of experience with Vuejs.

3 Likes

@bradtaniguchi

I see your point. I might have to grunt my teeth and start using React more. I have used both Vue and Angulsr professionally in the workplace. What state management library would you recommend?

I’d consider what your building and what other choices you are making before reaching for a state management library.

By itself React’s hooks API and context can handle most basic use-cases. Build a few custom hooks to provide the same state everywhere and your basically done from the component standpoint.

Its admittable the hook API is weird compared to other frameworks, but that “weirdness” is also what makes it extremely powerful. The fact a function can just pump out the value you need is essentially as simple as you could get from specific standpoint, the goal is getting there.

However it all goes back to what your building and how complex the state could get. If your mainly rendering UIs using some HTTP request data, and the render state isn’t super complex, then you might not need any state management at all. If your UI is very complex, you could look into Redux, or the like.

1 Like

Yeah, I liked React before, but hooks are just sooooo awesome. It took a while to adjust my way of thinking away from lifecycle methods, but man, being able to sequester off a bunch of logic into a custom hook is awesome.

Because the universe is not sitting around wondering, “I wonder what kind of job Hayden wants?” It’s not their job to provide jobs that fit what you want, it’s your job to make yourself able to fit their needs.

It reminds me of my jazz musician days and musicians complaining that there were too many mellow “dinner jazz” gigs and not enough where they could go crazy. They thought that people should pay musicians to play whatever musicians wanted to play. I kept trying to explain to them that they were being paid to play what the client wants to hear, not what the musician feels like playing. They just couldn’t get passed their sense of entitlement.

It’s like someone that opens a restaurant specializing in boiled cabbage complaining about no customers. It’s not the customer’s job to pay for whatever he wants to cook. It’s his job to cook what will attract customers.

1 Like

If Vue had appeared first then maybe that would be the de facto standard UI library. It does [essentially] the exact same thing as React. React has a massive advantage in terms of ecosystem and resources and available developers and tooling. Vue may have a slightly better developer experience in some respects, for some people, but so what? A vaguely better experience doesn’t count for much.

To unseat it there has to be some compelling [business] reason for everyone to switch, and there just isn’t. There will be at some point, but not to Vue, to something new. That being said, Vue is heavily used (as these things go), and seems like it will continue to be for a while. Just not to anywhere near the level React is used.

There used to be Mootools, Prototype, jQuery & a few others and they all did basically the same thing. Then jQuery won, and everyone used that for a while. And there were similar things that emerged that had similar APIs but tweaked some of the ways jQuery worked, a few people used those. Current situation re UI libraries is similar.

Angular is a slightly different case. It comes with everything, and there’s one way of doing things. And, like most Google-derived things, it looks like Java. It looks like an enterprise thing and unsurprisingly enterprises tend to be the core users of it.

Yeah, that’s a trade-off.

  1. A framework that does everything is difficult to keep up to date, is very complicated to maintain.
  2. A library that does very few things is much easier to maintain but requires users to plug in other things.
  3. An ecosystem of libraries has flexibility but it’s a lot of libraries that all need to be kept in sync.

React is 2, it doesn’t care*. Angular is 1. Vue is kinda 3.


* Note that React does have an officially supported pattern for state management (flux), for which redux is the most common implementation. And latterly it has Relay, which is patterns + tooling, fully supported. But those solutions are tied quite closely to FB

2 Likes

Edit: the reason why I am complaining is that just about all jobs I have looked at want extensive React experience. My former company I worked for is considering switching from Vue to React because they are struggling to find Vue developers.

Companies care about quarterly results / profits and for that PM wants developers to push out new features at the earliest, customers don’t care about how you built software.
As React has got majority of the developers; this framework / library dominates market and frankly if Meta / FB is supporting React, React Native why not use it & fall in love with it ?

Each framework has got its own merits, demerits; we need to love our work as it pays our salaries.

As a developer you have another option of working on your own or start loving what you do everyday. Or be CTO of your company and influence what needs to be used in tech stack.