Tuesday, April 24, 2018

Angular–Reduce the sharing of your observable streams

Yesterday I was discussing with a colleague the pro’s and con’s of Observable streams. One of the disadvantages is that you can end up with situations where you want to have multiple subscribers be aware of the same stream and share the stream in multiple contexts. This is a tricky situation not in the least because you have to be aware about the difference between hot and cold observables.

Today another colleague pointed me to the ‘async as else’ syntax as a great way to reduce the sharing of streams to a minimum. Here is a small code snippet he sent me:

1 comment:

Kalai chellam said...

Very nice post here thanks for it I always like and search such topics and everything connected to them.Excellent and very cool idea and the subject at the top of magnificence and I am happy to comment on this topic through which we address the idea of positive.

OFFERS IN CHENNAI