

Ask HN: What are the arguments for and against React/Flux over Angular JS? - nstart

I&#x27;ve seen a lot of these debates on this around on the internet, but they&#x27;ve very quickly become outdated given the speed that the frameworks are being developed at. A good example would be the leap that React Dev tools took with their latest release. Also, the whole argument about Angular not providing an upgrade path to 2.0 is no longer valid. Are the two equal now with just preference towards architecture being a deciding factor? Or are there more compelling arguments for either one?
======
kentor
Any framework that uses a templating language, in other words some form of
HTML with enhancements (Angular/Ember), will always be inferior to the virtual
DOM approach (React/Mithril). Why? Because the virtual DOM approach embraces
javascript and its expressiveness. With templating languages, such as
Angular's or Ember's Handlebars, well first I have to learn its DSL, then I
always feel constrained in what I am able to do with them. The lack of
expressiveness becomes extremely frustrating on big projects. Then there's
also the lack of debuggability and tooling.

My view is that HTML is just one way of declaring the DOM, but ultimately HTML
or some enhanced version of it is just a string. The virtual DOM is another
path to constructing the DOM, but instead of a string it's javascript upfront.

------
mattkrea
I don't have any arguments _for_ Angular (I don't like it and instead prefer
Ember).. I do have some feelings regarding React.

Flux is not a framework so until there is a clear way to use it beyond a
single page of short examples it's not ready.

React is also only the view where Ember and Angular are the full MVC. If you
have a single page app that has maybe one view with a lot of components maybe
React makes sense. Anything beyond that though and it absolutely does not.

Need a login page? a profile page? etc.. All that stuff will be separate React
applications served from separate HTTP endpoints which is going backwards
IMHO.

~~~
kaixi
React is Angular Directives done well IMO. But it lacks features of a full-
fledged MVC framework.

That said, you can absolutely have a multi-page SPA built with React. Check
out React-router.

The code that communicates with the backend should be in your Flux Actions.

To check if you're authenticated before rendering a view, intercept the router
transitions.

