DEV Community

Discussion on: The Famous Misconceptions in Angular

Collapse
 
dylanesque profile image
Michael Caveney

You can write async code just fine without a complicated library like Redux Saga or RxJS. RxJS really shines when you have to combine or pick through data in a certain way, but it's total overkill as the base data-fetching paradigm for Angular.

Thread Thread
 
vugar005 profile image
Vugar

Well in that case don't use RxJs in case of feeling overkill. It is totally fine, but you never know, requirements are rapidly changing so you end up refactoring to RxJs or other libraries.

Thread Thread
 
shaijut profile image
Shaiju T • Edited

In some Angular tutorials, RxJs is used to make simple http call to API. Is the purpose RxJs is just to make Ajax call or there any particular use case to switch to RxJs?

By the way, Below RxJs video made it simple to understand.

youtube.com/watch?v=eUYigtm3Sdc

Thread Thread
 
vugar005 profile image
Vugar

I just updated the blog, with and without RxJs example. Thanks.

Thread Thread
 
dylanesque profile image
Michael Caveney

You cant uncouple RxJs from the Angular HTTP API.

Thread Thread
 
dylanesque profile image
Michael Caveney

You cant uncouple RxJs from the Angular HTTP API.

Thread Thread
 
vugar005 profile image
Vugar • Edited

Hi Michael, you can convert Angular HTTP to Promise . See getData method in stackblitz.com/edit/rxjs-vs-promis...
Also developers are not obliged to use http, you can use fetch or some techiques. Http just adds additional useful features.

Thread Thread
 
lyrod profile image
Lyrod

It is really good to use angular http api (rxjs observable) when you want the ability to cancel any request by unsubscribing the subscription

Thread Thread
 
dylanesque profile image
Michael Caveney

The async pipe IS extremely nice

Thread Thread
 
lyrod profile image
Lyrod

Indeed