Join Bonnie Jean Brennan for an in-depth discussion in this video mergeMap, part of Learning RxJS.
- [Instructor] So far, we've only had one observable…at a time.…What happens if we're dealing with more than one observable?…Well, we have operators for that too.…They're actually many, but this was a bit confusing…for me at first, so I'm going to keep it simple for now…and just show you a few.…We'll start with mergeMap.…First, just for a sec, let's jump back over to the docs.…This is the first time we'll see marvel diagram…with two streams.…See how those two streams are merged into one.…They're actually many different ways to merge two streams,…including combineLatest and with latest from.…For now, we're using mergeMap.…
So, for this example, let's create an observable of letters.…We need to import the observable of.…I know all these imports might seem tedious,…but remember we want to keep our bundle size small,…so we're only going to import what we need.…While we're here, let's go ahead…and import the mergeMap as well.…Now, we don't need this, but we're going to keep those numbers…because we're going to use those in a minute.…
- Creating observables with rx.observable.create
- Subjects, including behavior and replay subjects
- RxJS operators
- Creating an observable from a UI element