While Vue.observables are a great way to share states (and their statically inferrable types) across components, they fall short in their lack of other features that would otherwise make them comparable to using Vuex or a new Vue bus. For example, computed properties are a really useful feature that are available in Vue instances and Vuex stores (getters), but if you want to use them with a Vue.observable, you have to construct the computed property via either of the aforementioned alternatives, instead of being able to conveniently access it from the observable itself, like you would any other property of the observable. Other features, like watchers and methods would also really come in handy
const counter = Vue.observable({ count: 0 }, {
computed: {
square: observable => observable.count ** 2,
},
watch: {
square: newVal => console.log(`the square is ${newVal}`)
}
})
This is pretty much the function api RFC and for Vue 2 you can use https://github.com/vuejs/vue-function-api
Most helpful comment
This is pretty much the function api RFC and for Vue 2 you can use https://github.com/vuejs/vue-function-api