54
rated 0 times
[
59]
[
5]
/ answers: 1 / hits: 16561
/ 4 Years ago, wed, august 5, 2020, 12:00:00
I am using Vue 3 beta version and I am trying to access ref in setup function, My component:
JS(Vue):
const Child = createComponent({
setup () {
let tabs = ref()
console.log(tabs)
return {}
},
template: '<div ref=tabs >Wow</div>'
})
Demo: https://jsfiddle.net/xkeyLwu4/2/
But the value of tabs.value is undefined. What I am doing wrong here?
More From » vue.js