DEV Community

Discussion on: 7 Reasons Why React is King of JavaScript UI Frameworks

Collapse
 
brianmcbride profile image
Brian McBride

JSX isn't bad, but I see @jonrandy 's point.

I think since the first days of app development anywhere, there has been the constant learnings of "don't put your business logic in your views."

I don't use Angular as my first pick of a tool, but partly the reason many devs don't like it is because it forces them to actually use a MVC (varient) pattern. Since hooks came around, I see more and more code just thrown into hooks and shoved into view components.

This makes the code harder to test in unit tests and automation. It makes it hader to refactor or update later. It makes it harder to debug. But it sure is easier to code on the first pass.

Like all coding languages though, JSX can be great. React expects the developer to properly architect the app. If you take the time to build your logic in isolated modules (that can still be called in a hook) you end up with the "contollers" and "services" in Angular. Unless you are building a portfolio website or something crazy simple - a proper React app/site is going to be just as big and heavy as an Angular site.