Which frontend framework should you learn in 2021 | React VS Angular

React VS Angular

Which frontend framework should you learn in 2021

Well, let’s take a look at two front-runners angular and react. we’ll break it all down compare the two and I’ll tell you which one I think is the best. I will brief on React vs Angular .

let’s go ahead and talk about two of these really big name frameworks out there in react and angular and I want to kind of coming with this from the perspective of so many people who are really worried about making the right decision of oh which technology or which framework should I learn. They get started in web development, they learn aboutHTML, CSS, Javascript and they want to know kind of what’s next and what are the things they should be looking at so I’m going to give you kind of an overview of React and angular. Talk about some of the built-in features, some of the learning curve the ecosystem, the community job opportunities and then I’ll sum it all up by the kind of giving you my personal perspective on which one of these make the most sense so let’s start with an overview of angular

React VS Angular

React VS Angular

Angular is a framework that was created by google still is maintained by Google. It’s very structured it uses typescript which is actually pretty interesting and kind of cool. They have a new version of angular out every six months. They’re pretty committed to that they’re at 12¬†right now.

On the flip side of that, you have React which is created by Facebook it’s a lot more lightweight and in terms of code not necessarily in speed but in terms of like code because there’s not as much built-in. And some of that makes it really easy to get started although typescript is really nice and angular it’s another thing for people to learn to be able to get into angular we’ll talk more about the learning curve here in a second but react is pretty lightweight and pretty easy to get started.

React VS Angular

Now I do want to make one clarification there is a big difference between AngularJs and then Angular two three four five or two four five six seven eight nine ten I guess they skipped a few in there and the big difference is AngularJs was kind of the original version of angular. It was a lot more similar to something like Vue is today and angular really bet on the future of what web development frameworks would look like and they made this big migration to angular two and then four and then some numbers all the way up to twelve so if you know what I’m talking about today is angular 2 plus not AngularJs. So if you see things for AngularJs it’s a completely different topic, not something we’re talking about today

So let’s dive into some of the built-in features. let’s start with angular as a whole has a lot of stuff built-in and you get into lots of debates about framework versus library a lot of people consider. Angular to be a framework and react to be a library because angular does come really pre-packaged with a lot of things such as application development process, they have an HTTP client, they’ve got services that can do some of the business logic for you. It has a lot of structure there’s a pretty opinionated structure on the file setup and when you create components what the file structure looks like and all that sort of stuff in angular then there’s also built-in routing so they’ve got a router built-in as well and one of the things I really like about angular is the scaffolding so the angular CLI comes with commands to generate components for you. When you generate a component, for example, it gives you a CSS file, HTML file, a typescript file as well as a test file so all of that stuff being like kind of given to you one is really nice.

I kind of like that angular is opinionated because I don’t really have to think about my structure whereas React is completely opposite. In React you basically have to get extra packages for almost everything that you want to do a big example of that would be for routing. Routing is not built in React. You have to get a package for that react-router dom being a common one and then things like state management are things that you’d pull in like Redux. You can also use the context API when you get into bigger applications. Redux is a popular one there and that is only fair to mention that people bring in outside packages for state management and angular as well when they want to if they have a preference and they have experience but angular just has a lot more built-in. React is pretty minimal and then because of that, you have to pull in outside things

So now let’s get into the learning curve again the big difference here is, Angular has a ton of stuff built-in versus react doesn’t. So with angular, there are lots of things that you have to learn. You have to learn Typescript which is a superset of Javascript. Typescript is super cool it gives a lot of structure to your javascript. It gives you basically strongly typed language where javascript does not. Typescript in theory helps you catch errors and that sort of stuff. That’s really nice but using typescript does come with a learning curve so that’s part of it. The other thing is I feel like angular there’s so much in angular that is angular specific there are syntaxes in angular that are only used in angular versus for React for me almost everything in react is really just kind of regular javascript. It’s stuff that you’re used to doing especially if you’re good with ES6. If you’re good with classes that sort of stuff then there’s not a whole lot of extra things going on in react that are specific to react so that’s one of the downsides for me in the angular space. It’s very powerful but to do different things to use the different directives, for example, they’re syntaxes that you just have to memorize or you have to look up every time.

In Short

react vs angular

Conclusion

I really love to code in Angular and React. But my advice will be to learn  React first since it talks basically about simple Javascript. If you want to jump to more complex then you can definitely go with Angular.

 

Reference

https://www.guru99.com/react-vs-angular-key-difference.html

 

Leave a comment

Your email address will not be published.


*