Course lesson

Use RxJS mapTo and map to Transform Values Emitted by Observables

transforming the values emitted by observables. We made our first operator called multiplyBy, which looks a bit useful, but in practice we don't need it because it's too specific: it only does simple multiplication on numbers. In this lesson we will see how...

Duration
4 min
Access
Pro
Transcript
Available

transforming the values emitted by observables. We made our first operator called multiplyBy, which looks a bit useful, but in practice we don't need it because it's too specific: it only does simple multiplication on numbers. In this lesson we will see how the map() operator is useful for any calculation on delivered values.

🚨 Since we are importing interval from RxJS, we don't need to preface our Observables with Rx.Observable. You can no longer .{operator}, you need to .pipe({operator}) instead.