Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Can React also connect with backend APIs to fetch JSON and present them on the frontend?

Yes, obviously. My company uses it for this. Personally, I don't know if AngularJS is a better alternative moving forward because it has a bigger community and companies such as Microsoft are integrating it on Visual Studio.

(Sadly being downvoted for saying this)



I've read through the docs and they basically use JQuery for AJAX calls. Is that what you were referring to?

React will keep getting bigger, and AngularJS has no answer to React Native which I find pretty revolutionary.


(I work on the React team.)

The folks working on Angular 2 are looking at interop with React Native's native shell so that you can write native apps in Angular (2) as well.


How revolutionary does it end up being if you have to farm out a lot of hte stuff you'll do to other JavaScript libraries which presumably do not have a native component?


I've been told by several friends who love React that this is one of the main selling points.

It basically just gives you a view engine and then you have the flexibility to select what other libraries you want to supplement the rest of the app components.

This differs from other frameworks like Angular where you have to "go all in" and don't have the flexibility so that if something major changes (like when the Angular team announced HUGE changes coming in 2.0) you might get stuck with something you don't like. In this way, it's easier to switch out a part of your app as opposed to having to completely rewrite something if you use a full framework like AngularJS.


I get that but there's a sort of value to a monolith that gives you most of what you'd need to build an SPA with a "guarantee" that all the components are reasonably good too.


You've misunderstood.

I said React Native is revolutionary. It's the first JS framework that lets you build native iOS and Android apps. Key word here being "native".

React itself was designed as a UI library, purely to be used as the "V" in an MVC app. It's like expecting D3.js to do your AJAX calls. Unless it's a full front-end framework, there's no point trying to do everything.


Surprisingly D3.js actually can do your AJAX calls with d3.xhr()!


Perhaps that's natural, but I mean, if you had, say, "Angular Native" you'd have a whole application which would be wild.


What do you mean?


I mean that the competing frameworks are whole application frameworks instead of just a view; being able to write them and compile them to native would be even more powerful.


> I've read through the docs and they basically use JQuery for AJAX calls. Is that what you were referring to?

Yes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: