-
Notifications
You must be signed in to change notification settings - Fork 8
Description
There's a new proposal for Observables currently in TC39 phase 1 that defines a basic inter-op that is supported by RxJS, MostJS, Zen-Observable and some other libraries. This allows for a common minimal level of support an object needs in order for it to be observable and take part in 'reactive' programming / streams (whatever you want to call them).
The minimal inter-op is actually very basic and I'd like to suggest adding support for it to Type-R or even at a lower level to MixtureJS. At the MixtureJS level the type of events being handled are unbounded so the resulting observable stream would be just raw events. At the Type-R level more structure could be offered.
I've put together a gist of a basic example that doesn't assume anything about the structure of the events here: https://gist.github.com/far-blue/05c679b4e4cb5fe1df1d36006e8a21fa
I'd be interested in people's thoughts and comments.
Not only would Observable inter-op be nice and allow Type-R events to work with other frameworks it could also change the way we think about integration of Rest APIs with Type-R because Rest API results could just be handled as Observable Streams.