The most compelling story I find, for web platform folks, is "observables are to events as promises are to callbacks". Everyone loves how by making an async result into a first-class object, promises unlocked a lot. In short:
They can be passed between different parts of the program, which don't need to care about how they were originally generated in order to then() the promise / subscribe() to the observable
They can be fed to combinators, like Promise.all() / observable.map()
And, even better than the callbacks -> promises transition, because of how EventTarget is already everywhere and we've found the perfect way to slot into EventTarget, this won't be a case of having to migrate the whole web platform. We'll just get this nice upgrade to first-class objects, for free, whenever the web developer wants to switch their code!
I think this selling point should be relatively high in the readme.
The most compelling story I find, for web platform folks, is "observables are to events as promises are to callbacks". Everyone loves how by making an async result into a first-class object, promises unlocked a lot. In short:
They can be passed between different parts of the program, which don't need to care about how they were originally generated in order to
then()
the promise /subscribe()
to the observableThey can be fed to combinators, like
Promise.all()
/observable.map()
And, even better than the callbacks -> promises transition, because of how
EventTarget
is already everywhere and we've found the perfect way to slot intoEventTarget
, this won't be a case of having to migrate the whole web platform. We'll just get this nice upgrade to first-class objects, for free, whenever the web developer wants to switch their code!I think this selling point should be relatively high in the readme.