Answer the question
In order to leave comments, you need to log in
How to use Vue js 3 object properties?
Hey!
I can not figure out even with the documentation how to use the properties of the components.
I create an instance but alas I get "undefined"
More code.
const Start= {
data(){
return {
show: true,
short: 1
}
},
methods: {
async Start(){
const app = Vue.createApp(MyComponent)
console.log(app.count) <---- вот тут "undefined"
}
}
}
const MyComponent = ({
data() {
return { count: 4 }
},
methods: {
TestMetod(){
this.count++
}
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question