Use RxJS combineLatest to Only Emit Notifications When Certain Events Have Happened

InstructorRares Matei

Share this video with your friends

Send Tweet

Having just congratulated us on the very quick and bug-free turn-around of our previous work item, our manager pings us again to tell us that this time, some tasks finish very shortly after our 2 second threshold. So users are still seeing the glitchy spinner behavior. Our new requirement is that once we start showing the spinner, we need to show it for at least 2 seconds, even if there are no more tasks in the background. To solve this, we will create another proxy, this time for the hiding set of events, and use the combineLatest to wait for two events to happen before we can hide the spinner: we actually get the instruction to hide it (no more tasks in the background) and at least 2 seconds have passed.

Sean White
Sean White
~ 10 months ago

fyi - the lesson 10 branch is misnamed (lesson10 instead of lesson-10)

Lucas
Lucas
~ 10 months ago

fyi - the lesson 10 branch is misnamed (lesson10 instead of lesson-10)

Thanks for that Sean! I got that fixed and the Code link should work now.