DEV Community

Discussion on: React Js Vs Angular Which is Better ?

 
peerreynders profile image
peerreynders • Edited

It is not bad to start learning with something well known and being able to use the knowledge for other similar technologies in a project.

In this context we are talking about frameworks which have very different opinions (even the React component runtime is an opinion) on how to abstract over the web which often leads to accusations of:

  • Angular being unnecessarily bloated.
  • React unnecessarily re-implementing existing browser capabilities (e.g. the synthetic event system; it's only going to get worse with React Server Components; if you don't need React native consider using Preact instead; e.g. Etsy).

The point I'm trying to make is that learning to use a framework doesn't create a sense of the constraints the web has to operate under (native apps have it much easier); thus to the untrained eye it's not always obvious which tradeoffs are being made by any particular framework. So learning one framework may make it easier to learn the next framework but "understanding what makes the web work" isn't a given. Having a framework-centric view of web development can lead to products that behave like this in the real world.

If web development (e.g. What is a web developer?, video) was organized as a trade with an apprenticeship it could introduce developers to the whole range of available rendering options:

  • How to use HTML/CSS to create a static page
  • How to use JavaScript to add interactivity
  • How to use a static site generator (SSG) to generate an entire site
  • How to structure a server rendered site with dynamic content
  • How to use CSR framework for richer interactivity
  • How to use SSR to improve the experience of CSR applications

With that kind of spectrum of experience it would be much clearer when it is appropriate to use what technology. Instead people seem to exist at either end of that list leading to The Great Divide.

While it is true that frameworks can make developer's lives easier and more productive it doesn't change that:

  • The web is the most hostile development platform in the world (especially for resource constrained devices).
  • The web isn't one environment but a wide spectrum of uncountable combinations of client device capabilities, network conditions and server platforms/technologies. And web-based solutions cover the whole spectrum from documents to applications.
Thread Thread
 
optimisedu profile image
optimisedu

Great post
Main point from this which I will expand on: Learn the fundamentals and write for your usecase.

So angular is batteries included as you said. It also employs two way data binding and when badly written can be an objective mess.

You need to understand their lingo to make apps which are nice and performant after the initial load time.

Social workers for a pwa come included. That can be great, with both frameworks you need to think small and work up with a plan.

Angular is pretty opinionated which can be nice, or can be a bit overwhelming.

That said jsx takes a bit of a paradigm shift to work with which many people prefer.

They are both very heavy platforms which I feel are overused. They have definite usecases but if your project is small don't add thosands of dependency files. It's not a case of is X or Y better. Aim to know when it is best to use X Y Z or just vanilla sprinklings.

My 0.02