Slide 1

Slide 1 text

RxJS von Grund auf - Teil 2 Operatoren und Operatorenketten Yannick Baron @yannick_baron https://www.thinktecture.com/yannick-baron

Slide 2

Slide 2 text

working with RxJS Recap: Practical Introduction

Slide 3

Slide 3 text

• Observable
 data stream or source emitting data over time • Observer
 function that will be called when new data is emitted • Subscription
 one-sided connection between Observer and Observable • Operators (combination, filtering, transformation, ...)
 replace your observables with a modified one Observable, Observer, Subscription & Operators

Slide 4

Slide 4 text

• Observable
 data stream or source emitting data over time • Observer
 function that will be called when new data is emitted • Subscription
 one-sided connection between Observer and Observable • Operators (combination, filtering, transformation, ...)
 replace your observables with a modified one Observable, Observer, Subscription & Operators

Slide 5

Slide 5 text

• three events we can react to • next
 receive the next value going through the stream • error
 react to the observable throwing - no more values will be emitted
 observers unsubscribe - observable does not complete • complete
 observable completes without error - no more values will be emitted
 observers unsubscribe
 next, error, complete [Examples: 02, 03]

Slide 6

Slide 6 text

new Observable(observer => {
 observer.next('Value 1');
 observer.next('Value 2');
 observer.complete();
 
 return () => {
 // observer unsubscribed
 };
 });
 
 from(['Value 1', 'Value 2']);
 
 of('Value 1');
 
 create, fromEvent, interval, ...
 creating Observables is easy!
 wrap asynchronous actions several (12) creation operators [Examples: 01]

Slide 7

Slide 7 text

It's a wrap! https://www.thinktecture.com/yannick-baron