Releases: vuejs/vue-rx
Releases · vuejs/vue-rx
v3.0.0
v2.0.0
Breaking Changes
-
Instead of using observables in
data
, a new optionsubscriptions
should be used. The option accepts either an object or a function that returns an object:new Vue({ subscriptions: { msg: messageObservable } })
New
Compatibility with Generic Observables
You can now use this plugin with other observable implementations, as long as it implements the .subscribe
and .dispose / .unsubscribe
interface. For example, you can use it with most.js
or Falcor streams.
$watchAsObservable
This feature requires using RxJS.
This is a prototype method added to instances. You can use it to create an observable from a value watcher:
created:function () {
this.$watchAsObservable('a')
.subscribe(function (val) {
console.log('stream value', val)
},function (err) {
console.error(err)
},function () {
console.log('complete')
})
}