The 2 dead-simple reasons your business should use Angular. And the price you could pay if you use React.
Disclaimer —This is a biased post and if you’re a React fan you’re not going to enjoy this article. In fact, don’t even read it.
So you wanna dig up a good answer and discover why your business should use Angular instead of React, huh?
Maybe you and your co-founder or developers are arguing about this? So you Googled and found this article. 😉
Now is the time to decide.
And it’s important you get this right.
No smart business wants to scratch their code and re-write an entire business application in a different framework or library.
Your time is crunched. ⏰ And money is at stake. 💰
OK. OK. I’ll be honest. React could probably do the job. But it won’t crush the job.
Angular by default has some features that React doesn’t.
Starting with the first feature…
1. Angular is a framework. React is a library.
Let’s make this real with a story.
Turn the lights down and find a spot to get comfortable for a few minutes.
What does React and a redneck plumber have in common?
It’s 10 AM. The time you scheduled to meet a local plumber to fix the aggravating leak under your kitchen sink. You hear a rumble and look out the window. There’s the plumber in a rusty beater like the one below.
Really? Maybe not exactly as old as the picture above but you get the point.
He jumps out with a plumbing wrench. You meet him at the door and quickly discover that the only tool he’s got is that one silly wrench in his hand.
“No toolbox?” (you)
“Nope.” (plumber)
“How are you gonna fix my leak with just one wrench?” (you)
“I think all I’ll need is this wrench. Show me the leak please.” (plumber)
“No thanks. I’ll find someone else to do the job.” (you)
Yaaaaaawn.
React reminds me of the plumber with only one wrench. It’s a library. For example, React cannot connect to REST API’s. You have to add a 3rd-part HTTP library to your project.
React is only good at one thing — building user interfaces.
Angular is a toolbox. It has all the tools needed to build an entire application.
The more 3rd-party libraries that you add to your project the greater potential for conflict and disaster.
2. Angular is civilized. React is redneck.
Angular uses Typescript.
By default.
No extra configuration needed.
No wasted sweat.
Typescript gives the benefits of static types and better Object-Oriented programming support which avoids many of JavaScript’s quirky bugs.
And better yet, the structure of an Angular project is predictable. The way the files are named and the folders structured follows the same pattern in every standard Angular project.
And best of all, every standard Angular component has the same structure. An HTML file. A CSS file. A Typescript file. And a test file (optional).
The Angular CLI enforces a standard project and code structure.
React has no way to enforce how developers code the project… making code debt grow like weeds.
There’s to many ways to structure code.
And I’m not the only one that’s saying this.
I have to help with a react project at work right now which was developed by some hipster for our client. This hipster used FOUR different ways to create components! — Reddit
I like React more when I’m writing it, but most React code-bases are pretty poorly architected. — Reddit
Let your competitor trash hours of energy writing a style guide for their React code.
You can use Angular to create civilized code quickly or just use the guide that’s already been created for ya.
Wha-da-ya think?
Are you going to use Angular or React?
Go ahead and drop your comment below.
Please share the energy with a BIG 👏 by pounding that clap button and follow me on Medium for more short and helpful articles like this one. Thank-you!
Here’s a few that you might have missed.