I want to update data in a component from my Vue instance. Finding plenty of examples on how to do the opposite, but nothing on this.
Say I have:
Vue.component('component', {
props: {
prop: {
default: null
}
},
template: '#template',
data: function () {
return {
open: false
};
}
});
Now I would like to set open to true from my Vue instance:
var root = new Vue({
el: '#root',
data: {},
methods: { updateComponentData: function() {//set open to true} } });