vuejs/vue-rx

Compatibility with mostjs (#observe vs #subscribe)

dodas opened this issue · 0 comments

dodas commented

In readme, there is stated vue-rx can be used to subscribe to most.js observables, but it does not seem to work out-of-box. mostjs observables needs to be subscribed using observe method which does accept simple handler. vue-rx is calling subscribe method which expects Observer object (https://github.com/cujojs/most/blob/master/docs/api.md#subscribe)

functioning workaround:

{
    subscriptions () {
      const num = most.periodic(100).scan(x => x + 1, 0)
      num.subscribe = num.observe
      
      return {
        num,
      }
    },
}

I am new to observables, am I doing something wrong? Thanks.