Skip to content

Is there a way to add mobx to vue plugin component inside Vue.component, Vue.extend install function?  #87

@ColtHands

Description

@ColtHands

Basically i want to add my state globally through install fn, but I can't seem to find any examples.

export default {
    install(Vue, options) {
        // this will work, but wont be observable by component
        Vue.prototype.state = new StateClass()

        // I want to add mobx on this step, state above will work, but wont be observable
        Vue.component('MyCustomComponent', Vue.extend(MyCustomComponent))
    }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions