Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

declaration vue 3 variables

export default {
  setup() {
    const count = ref(0)

    return {
      count
    }
  }
 // if you want change count variable, remember!
 // you only can when you will refer to "count.value"
 // EXAMPLE
 changeCountValue() => {
 	count.value = 4
 }
}
 
PREVIOUS NEXT
Tagged: #declaration #vue #variables
ADD COMMENT
Topic
Name
6+4 =