RxJS operators mergeMap and switchMap are useful for handling asynchronous responses from the server, but they can do much more.
In this lesson, we will see how to use mergeMap to achieve the same functionality as map() or filter() or other custom behaviors.
We’ll define a simple state object in the constructor of the App Component class. Once the state has been defined, we’ll replace the static elements in our rendered output with values from the component’s state. We’ll move from static items to an array, seeing how we can use functions like map to render our UI.