DEV Community

Discussion on: Using script Setup for Vue 3 SFCs

Collapse
 
peshanghiwa profile image
Peshang Hiwa

Hi dear, thanks for the amazing article, I had a problem with accessing "this" keyword properties in this new setup as it is undefined,
ex: in my previous projects i could write this.$vuetify.themes.colors.primary,
but now i can't as "this" keyword is undefined,
how to access $vuetify?

Collapse
 
alvarosabu profile image
Alvaro Saburido

Hi there, thanks for writing. So sfc works along with the composition API, is a sugar syntax for the setup function so you will be not able to access $vuetify through this.

Check if Vuetify already supports vue 3 and composition API vuetifyjs.com/en/introduction/road...