RxJS for Architects

  1. Open this project in your browser

  2. Find out, how the examples works. For this, have a look to the component and facade service in the folder flight-lookahead.

  3. Try to answer the following questions regarding the facade:

    • Why are the subjects private and the observables readonly?
    • What does the method asObservable do?
    • Why does online$ use shareReplay at the end?
    • What does the parameters passed to sharedReplay mean?
    • What does combineLatest do?
    • Why does flights$ use switchMap?
    • How is error handling done?
    • Why is error handling important here?
  4. Try to answer the following questions regarding the component:

    • What does debounceTime do for the Observable input$?
    • How does this component unsubscribe from the Observables used (hint: there are two different answers!)