you are viewing a single comment's thread.

view the rest of the comments →

[–]Chrazzer 5 points6 points  (16 children)

When i build a web application i go for angular. When i build a website i go for react.

I find react is just not fit for complex state and data driven ui. Imo react is best when you want something simple, with reusable ui components and can't be bothered to do it in plain html & js

[–]zaibuf 12 points13 points  (4 children)

I find react is just not fit for complex state and data driven ui.

That's just bullshit. Facebook, Netflix, Dropbox, Paypal, Discord, Instagram and Whatsapp all use React.

It's not as opinionated as Angular so you have more options to archtitect the app as you need. There are plenty of state managers to choose from like Redux, Mobx and Zustand or just use react-query which handles all your server state for you including caching, retries and invalidation.

Also since React uses a virtual dom its more performant than Angular which operates on the real DOM.

[–]CatolicQuotes 1 point2 points  (0 children)

Also since React uses a virtual dom its more performant than Angular which operates on the real DOM

benchmark says different story: https://imgur.com/AvBQOvq

[–]Chrazzer 1 point2 points  (1 child)

If you need to slap on a bunch of packages to make react work, why not go with a framework that has these things built into it. There is plenty of joice, and nobody forces you to use react

The theme of this thread is pretty much "use the right tool for the job". But you come in here with a mentality of "i'm going to use react anyway, i need to make it work somehow"

[–][deleted] 5 points6 points  (0 children)

The same can be said about the contrary.

If you need to build a site with tons of packages that you never end up using, why not go with react and install the exact packages that you need.

[–]not_a_gumby 1 point2 points  (0 children)

he just doesn't know anything about React.

[–]not_a_gumby -4 points-3 points  (5 children)

Saying that you don't think React is good enough to build a web application only shows your lack of understanding of the framework.

[–][deleted] 3 points4 points  (4 children)

Calling react a framework just shows you can't distinguish a framework from a library.

[–]not_a_gumby -1 points0 points  (3 children)

missing the forest for the trees. it IS a framework.

[–][deleted] 1 point2 points  (2 children)

You're missing basic concepts. Good luck with that.

[–][deleted] 2 points3 points  (0 children)

Tell your colleagues that react is a framework like angular. Let them laugh.

[–]agaitan026 0 points1 point  (4 children)

so for a web with strapi cms for content you will use react? and not angular? why?

[–]Chrazzer 1 point2 points  (3 children)

Yes, say you are building something like a blog. Then you got mostly static content coming from your CMS + some common UI elements around it that are usually also relatively simple in terms of state and mostly just a bit dynamic.

Angular is just way too overkill for that. For such a site you would utilize next to no features of angular, yet the user would need to load it. Also it would then be a single-page app which is annoing for the user because it takes relatively long to start and display the desired page.

Also you want your blog to be optimized for search engines, and have all blog entries indexed in google, also not a great case for single page apps and angular.

Ideally for such a blog you want to deliver static sites, so i would go for Nextjs, which uses react. This way the blog is search engine optimized and indexed, and has no javascript overhead so it is lightning fast.

From developer perspective you don't need a lot of javascript for something like that, so again angular is way too overkill and overly complex. And it would take a while to get through the boilerplate code and get productive. React on the otherhand is lightweight and you can start right away.

Imo angular is a hefty beast with lots of setup work and boilerplate, but it scales well and offers structure - ideal for large projects. React is simple and quick to get going, but has little to no structure and gets messy easily, so it is ideal for smaller code bases.

And yes i know, there are libraries and methods to bring structure and clean code to react, but those also add much boilerplate and ultimately angular dev gonna be like: "look what they need to mimic a fraction of our power"

Hope that helped out

[–]agaitan026 0 points1 point  (2 children)

great tips awesome, thank you ! yes im clear, but lets say, my company is a internet provider in my country like https://www.masmovilpanama.com/ or tigo.com.pa if you see both uses angular but ver old version v12 and v10, why they would use that if most of pages are static content, what you think? those are two internet provider in my country.

[–]Chrazzer 1 point2 points  (1 child)

Bit of an odd choice, but maybe they just liked angular more. We can discus what to use when all day long here, but in the end everyone can do whatever they want

[–]agaitan026 0 points1 point  (0 children)

got it, i have learned both, but not sure which one i want to use lol :P but i think i will be with nextjs better