paldepind / flyd

The minimalistic but powerful, modular, functional reactive programming library in JavaScript.
MIT License
1.56k stars 85 forks source link

Is flyd interoperable with RxJS / zen-observable? #152

Closed andywer closed 7 years ago

andywer commented 7 years ago

Hi there!

I like the Ramda/Lodash-ish approach of flyd, but I am still wondering if I can feed it with observables created by RxJS, zen-oberservable & friends.

That would be quite cool :)

jlavelle commented 7 years ago

It doesn't seem like a great idea to me, but there are a lot of ways to use them together, if you really want to. Here's a contrived example:

var rxInterval$ = Rx.Observable.interval(1000)
var flydStream$ = flyd.stream()

rxInterval$.subscribe(value => flydStream$(value))

flyd.on(value => console.log(value), flydStream$)
andywer commented 7 years ago

Thanks for the quick response!