際際滷

際際滷Share a Scribd company logo
RxJS - think reactively
Aleksandr Gribanov, DataArt
丼仂 舒从仂亠 RxJS?
Promises
 One value
 Good for AJAX requests
 Cannot be canceled
 Not lazy
 Cannot be replayed/retried
Observables
 Stream
 Lazy
 Can be canceled
 Can be retried
 Easy to combine
Promises vs Obervables
.then(
successCb,
errorCb
)
.subscribe(
nextCb,
errorCb,
completeCb
)
Map
Scan
TakeWhile
Merge
SwitchMap
TakeUntil
舒仆亳亠  亳 仂仗亠舒仂仂于
.scan()
.delay()
.debounceTime()
.mergeMap()
.switchMap() = flatMap()
from()
fromEvent()
fromPromise()
map()
filter()
take()
Versions
RxJS 4.0
https://github.com/Reactive-Extensions/RxJS
RxJS 5.beta
https://github.com/ReactiveX/rxjs
舒从亳亠 亰舒亟舒亳 仆亠 仆亢仆仂 亠舒  RxJS
 仗仂仍亰亶亠 舒仄 亞亟亠 仂 亳仄亠亠 仄仍
 RxJS 仆亠 仆亢亠仆 仂弍 仂弍舒弍仂舒 从仍亳从 仗仂 从仆仂仗从亠
 RxJS 仆亠 仆亢亠仆 仂弍 亰舒舒弍仄亳亳 仂仄 仆舒 弍亠从亠仆亟
 RxJS 仆亠 亠亶仄于仂从, 仆亠 仆亢仆仂 仗亳舒 于亠 仗亳仍仂亢亠仆亳亠, 从舒从 仂亟亳仆
Observable
RxJS 于 亟亠仍亠
 Angular 2
 Redux-Observable
 rxjs-react-component
 vue-rx
 RxJS-jQuery
 CycleJS
Links
 http://reactivex.io/rxjs
 http://reactivex.io/rxjs/manual/overview.html#marble-diagrams
 http://rxmarbles.com/
仂仗仂

More Related Content

Aleksandr Gribanov ''RxJS - Think reactively''