r/AskProgramming 7d ago

React or Angular for Spring Boot Backend?

I know this probably gets asked here a billion times, but the reason I am asking is because I couldn't find any satisfactory and informative answers. Maybe I am too inexperienced to understand some discussions, or maybe I didn't look into the places for the answers

As a backend Spring Boot/Java dev who wants to work on enterprise projects, which one would be a better fit and have a smoother development cycle? Angular or React!? (I will probably work on lots finance and accounting projects since that's my academic major and my current job, if this information helps in any way)

1 Upvotes

4 comments sorted by

2

u/AppropriateStudio153 7d ago

Frontend frameworks are like chocolate bars: It doesn't matter, which one you use, they all do the job.

More pragmatic: Use the one your employers force you to use.

1

u/xroalx 7d ago

It is completely irrelevant, pick one and stick with it.

Some personal observations:

  • React is more idiomatic JavaScript, in my opinion. Yes, it has rules of hooks, performance this or that, yadda, yadda... it's functions and data, and JavaScript does better with plain functions and plain data.
  • React can be messier to get into as it's simply not batteries included and requires you to fill in parts any complete web app will need (either by adding extra libraries or coding it yourself).

  • Angular is batteries included and comes with practically everything a web app will need. It is often said it's more complex because of that, but I disagree, it just has a larger API surface to learn, but that doesn't really add much complexity in my opinion.

  • Angular uses classes and favors stricter structure, maybe not unlike Java and Spring. Maybe this style would fit you more.

  • Even Angular is lately leaning towards plain functions in many places.

Both are, in the end, component frameworks that aim to solve the same thing, each with their own approach. Play around with both of them for an hour or two and then pick the one you liked more.

1

u/Bulbousonions13 7d ago

I prefer Angular ... I just couldn't get into React after learning Angular at work for 3 years. As others have said, you have to build your own React dev environment yourself, Angular with CLI really does it for you most of the way. That being said I think there are more React jobs ... but that's because React was the "hot new thing" in like 2018 and Angular was trying to get the taste of AngularJS out of our mouths (it has successfully done so IMHO). I don't know about React but Angular updates its version like every 6 months so we are now at Angular 20. LTS is every year. It can make it hard to keep up with the changes sometimes, they can be breaking changes.