Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reactive Programming with RxJS

Reactive Programming with RxJS

An Intro to Reactive Programming with RxJS at JogjaJS event

Avatar for Danca Prima

Danca Prima

October 21, 2017
Tweet

Other Decks in Programming

Transcript

  1. Reactive programming is programming with asynchronous data stream. Anything can

    be a stream: variables, user inputs, properties, caches, data structures, etc.
  2. A stream is a sequence of ongoing events ordered in

    time. It can emit three different things: a value (of some type), an error, or a "completed" signal.
  3. u Java: RxJava u JavaScript: RxJS u C#: Rx.NET u

    C#(Unity): UniRx u Scala: RxScala u Clojure: RxClojure u C++: RxCpp u Lua: RxLua u Ruby: Rx.rb u Python: RxPY u Go: RxGo u Groovy: RxGroovy u JRuby: RxJRuby u Kotlin: RxKotlin u Swift: RxSwift u PHP: RxPHP u Elixir: reaxive u Dart: RxDart
  4. Observable & observers u Observables give data and observers receive

    data u Observables are just functions in JavaScript - they don’t do anything until you subscribe to them. u Observables are always observed by observers
  5. OPERATORS u buffer u bufferCount u bufferTime u bufferToggle u

    bufferWhen u combineAll u combineLatest u concat u concatAll u concatMap u concatMapTo u count u debounce u debounceTime u defaultIfEmpty u delay u delayWhen u dematerialize u distinctUntilChanged u do u every u expand u filter u first u groupBy u ignoreElements u last u let u map u mapTo u merge u mergeMap u partition u pluck u publish u race u repeat u retry u retryWhen u sample u scan u share u single u skip u skipUntil u skipWhile u startWith u switchMap u window u windowCount u windowTime u windowToggle u windowWhen u withLatestFrom u zip