RxJS v6.5

Reactive Extensions

Key concepts

 

  1. Stream
  2. Observable
  3. Observer
  4. Subscription
  5. Operator
  6. Subject

Operators

.map

.filter 

https://rxmarbles.com/

 

Observable API's in the browser

  1. Intersection Observer
  2. Mutation Observer
  3. Resize Observer
  4. Performance Observer

Will it become a standard?

tc39 stage 1 since late 2017 ¯\_(ツ)_/¯

ReactiveX

ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences.

 

It extends the observer pattern to support sequences of data and/or events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O.

RxJS vs angular2

Iteration vs Observation

  • Consumer in control VS producer in control

Observables

You can think of Observables as a function capable of returning or pushing values over time 

Create Observables

events, arrays , iterables, promises

hot vs cold uni/multi cast

RxJS

By Gabriel Cziprusz