DEV Community

Discussion on: Simple state management in Angular with only Services and RxJS

Collapse
 
gabrielaraujof profile image
Gabriel Araujo

I really liked this approach and I'm definitively going to use it! But I wonder how could it be used when we actually have to fetch data from an API?

Collapse
 
avatsaev profile image
Aslan Vatsaev

It's easy, i'll make an example soon

Collapse
 
klouddy profile image
Jake

Aslan, I like this approach quite a bit, but I have the same questions. What would it look like when fetching data from an API?

Thread Thread
 
avatsaev profile image
Aslan Vatsaev • Edited

Hey @klouddy @gabrielaraujof , I've updated the stackblitz example with a real REST API and some interesting techniques on how to do optimistic updates and rollbacks: stackblitz.com/edit/angular-rxjs-s...

Collapse
 
avatsaev profile image
Aslan Vatsaev

I've updated the stackblitz example with a rest api