I follow to use Meteor - Vue SSR
via (Meteor Vue Guaide).
But don’t understand.
Vue.mixin({
beforeMount () {
const { asyncData } = this.$options
if (asyncData) {
// assign the fetch operation to a promise
// so that in components we can do `this.dataPromise.then(...)` to
// perform other tasks after data is ready
this.dataPromise = asyncData({
store: this.$store,
route: this.$route
})
}
}
})
----------
export default {
computed: {
fooCount () {
return this.$store.state.foo.count
}
},
// Server-side only
serverPrefetch () {
this.registerFoo()
return this.fooInc()
},
Could help me for more detail or example???