#How do I wait for a method to be completed?
12 messages · Page 1 of 1 (latest)
for info, RxJs is more suitable for asynchronous data streams! (http request, data transmission every 2 seconds or in the future ....)
You don't need to use Promises
You can do whatever you want with Observables
I can't help so much if you can't share code
methodThatDoesThingsWithObservables() {
// does multiple things with various subscriptions and rxjs
}
that's already wrong. It shouldn't be multiple subscriptions
You can combine the Observables with forkJoin or combineLatest
so you get only one Subscription
Not really, it depends, for example the Observable that is returned from switchMap, can be a method that return's an Observable and here you will put the tap etc
so it will be more readable
Yeah it's hard in this days to be only backend developer