Intro to RxJs

OR: "Introduction to Observables"

OR: "WTF are Observables?"

ASYNCHRONY

aka The First Mindfuck of JavaScript

  
  function doSomething() {
    // Does stuff
    return computedThing;
  }
var mahDatas = doSomething();
// => undefined

ASYNCHRONY

aka The First Mindfuck of JavaScript

  
  function doSomething(callback) {
    // Does stuff
    return callback(computedThing);
  }
var mahDatas = doSomething(val => {
  console.log(val)
});

Everything is async

  • Application Lifecycle
  • AJAX
  • I/O
  • Users

deal with it

  • Callbacks
  • Promises
  • Fibers
  • Async/Await
  • Generator Functions

ReactiveX

Language agnostic API definition for implementing Observables.

  • Java
  • JavaScript
  • C#/C#(Unity)
  • Scala
  • Clojure
  • C++
  • Ruby
  • Python
  • Swift
  • and more...

RxJS

  • Collaborative Effort between Google, Microsoft, & Netflix
  • Open Source (Apache v2)
  • Works in browser or NodeJS
  • Safari 7+, IE9+

RESOURCES

Made with Slides.com