Run app using ng serve then navigate to http://localhost:4200/.
💻 Code Examples
reddit-search.component.ts function using RxJS switchmap to combine 2 observable data streams and return a new observable
this.results=combineLatest([validSubReddit,validSearch]).pipe(// This logs the user's intended searchtap(search=>this.logger.log('Search for: '+search)),// take an input observable, return a different observableswitchMap(([subReddit,search])=>ris.search(subReddit,search).pipe(retry(3),// Clear previous entries while waitingstartWith([]))));
🆒 Features
RxJS methods reduce unnecessary HTTP data requests