Join Bonnie Jean Brennan for an in-depth discussion in this video map, part of Learning RxJS.
- [Woman] Now I'm showing you all my favorite operators,…which means I have to show you the map.…Remember when I said I wanted to access that value…so I could do something with it?…Well, here's the answer, map.…So far we have a simple interval that will send us…increasing numbers until it hits the take.…Now let's add a map operator.…Remember, we have to import it.…Let's move this take operator down here to the subscribe,…and put it on another line.…
This is just so we can keep our code nice and neat.…And then we're going to add the map, right in here.…Of course, like any fat arrow, if we want to write something…more complex, we can just add the curly brackets…and move it to the next line.…In real life, you'll probably do something more complicated…but here, we're just illustrating how this operator will…let you modify the payload.…So we're going to keep it nice and simple.…We'll do map, and we'll take that payload,…and we're just going to multiply it by 10.…That's it, there you go.…
Let's go check the browser and make sure…
- Creating observables with rx.observable.create
- Subjects, including behavior and replay subjects
- RxJS operators
- Creating an observable from a UI element