I have run into a limitation of Movue while working on an application. The current functionality of the library does not allow loading fromMobx attributes from a mixin on a component. See example below:
const data = observable({
foo: 1
})
const mixin = {
fromMobx: {
foo () {
return data.foo
}
}
}
const vm = new Vue({
mixins: [mixin],
computed: {
value () {
// This value will be undefined in the current version.
// This PR allows this to work.
return this.foo
}
},
render (h) {
const vm: any = this
return h('div', `${vm.value}`)
}
})
As it stands, right now, the value foo will not be defined in the top-level component. This pull request pulls fromMobx attributes from mixins one-level below the top-level component to allow Movue to be used in mixin abstraction.
I have run into a limitation of Movue while working on an application. The current functionality of the library does not allow loading
fromMobx
attributes from a mixin on a component. See example below:As it stands, right now, the value
foo
will not be defined in the top-level component. This pull request pullsfromMobx
attributes from mixins one-level below the top-level component to allow Movue to be used in mixin abstraction.I have submitted a Pull Request at #21
EDIT: Spelling and adding a comment.