React-Redux Vs Angular 2

in #dev7 years ago

I am starting a new web project and was wondering whats best UI tech stack ( framework vs pur UI stack ) ?

I know that the world is probably either divided between the two mighty tech stack 'React' VS 'Angular2'.

I am hoping to write some Pro's and Cons of both in series of articles just to keep the documentation for myself as well as anyone who is looking for guidance on deciding which one to opt for! ( this may / will be continuously updating article..if its allowed by steem engine.

Angular 2, much like Angular 1, relies on HTML templates.

The good thing about ng2 templates is that they’re basically an enhanced form of standard HTML.

The bad thing about ng2 templates is that you have to learn a bit of Angular DSL. Stuff like `*ngIf` and `*ngFor`.

The ugly thing about ng2 templates is that when you make a mistake, they fail at runtime. Sometimes silently. Debugging Angular 2 templates can be a pain.

React doesn’t have templates. Instead, it has JSX, which compiles to JavaScript at compile time.

The great thing about JSX is that when you make a mistake, it’s likely to be caught at design time by a linter, or compile time, instead of waiting for runtime. Babel, ESLint, and lots of editor tools have built-in support for JSX.

Another great thing about JSX is that you can target more than just HTML with it. You can target custom markups, you can target the canvas, you can even target native mobile UI.

The bad thing about JSX is that it doesn’t exactly line up 1:1 with HTML tags. It’s a Frankenstein hybrid of JavaScript APIs and markup. That means you have to learn its quirks, such as using `className` instead of `class` — but since you can pretty freely mix plain old JavaScript with JSX for loops, conditionals, etc… I think it beats ng2 for learnability.

Sort:  

Great article!

I don't know enough about ReactJS, but love Angular. I don't find it hard to debug. The bit of Angular stuff like ngIf and ngFor is so simple and powerful and neccessary, don't really think it's a con. It's something HTML doesn't have. Pro about Angular also is it's more a full framework like also navigation, and use what you need, and can even mix in React if you wanted to.

Congratulations @khatri.hitesh! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

New japanese speaking community Steem Meetup badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.17
TRX 0.12
JST 0.027
BTC 61947.52
ETH 3004.68
BNB 541.30
SBD 2.47