OR: "Introduction to Observables"
OR: "WTF are Observables?"
352 Inc.
@swellhorn
me@eran.sh
github.com/Swingline0
aka The First Mindfuck of JavaScript
function doSomething() {
// Does stuff
return computedThing;
}
var mahDatas = doSomething();
// => undefined
Me
aka The First Mindfuck of JavaScript
function doSomething(callback) {
// Does stuff
return callback(computedThing);
}
var mahDatas = doSomething(val => {
console.log(val)
});
click
..... click
.............. click
.................... click
click
..... click
.............. click
.................... click
💥
💥
💥
💥
[click, click, click, click, etc.]
Proposed, native JavaScript Feature
Observables are collections of events
Language agnostic API definition for implementing Observables.