Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue computed

// Vue 3 (Computed getter and setter) in script setup.
const view = ref(false)

const computedView = computed({
  get: () => view.value,
  set: val => {
    view.value = val
  }
})
Source by vuejs.org #
 
PREVIOUS NEXT
Tagged: #vue #computed
ADD COMMENT
Topic
Name
1+4 =