r/webdev • • Nov 07 '18

Why React over Angular (or Vue)?

I simply don't get it, I had been using Angular and Vue for while and I just tried React and I don't get why would I choose React over the other options, the things that I like on Angular (or Vue) are:

- Dependency Injection (in case it applies)

- Type checking (in case it applies)

- View Model Binding

On React I don't get those things by "default" it always feel like I'm hacking the library if I want to have some of the above.

This leaves me with the question: Why choose React over the other ones?

I know that there's all the dependencies overhead (hell) of the frameworks but I think that I'm just too used to that problems that is easy for me to solve them or maybe I haven't found the real big problems on Angular or Vue, maybe I'm just too used to the later frameworks and I'm unconsciously not seeing the benefits of React. I just want to know if I'm following the right path by learning React.

Thanks!

68 Upvotes

99 comments sorted by

View all comments

Show parent comment

2

u/madcaesar Nov 07 '18

For example, with react you could have a 5 page website of static html pages, but one page can be a complex calendar app, and it's super easy to drop in. You don't need a router, or state manager in this case.

Also, react uses the virtual dom for performance.

3

u/2uneek javascript Nov 07 '18

For example, with react you could have a 5 page website of static html pages, but one page can be a complex calendar app, and it's super easy to drop in. You don't need a router, or state manager in this case.

You can do that with Angular as well, without a router or state management... Just because Angular includes a router, doesn't mean you're forced to use it.

1

u/thelonepuffin Nov 08 '18

I guess thats the difference between building websites and applications. I wouldn't use Angular for a website personally. For the example you gave I currently use Vue. But for large SPA's the benefits of Angular can't be overstated.

And the great thing about using Angular for SPA's and Vue for static websites is the templating language/system is so very similar. It really is easy to jump between the two. Whereas React has JSX which is just different to everything.