1👍
✅
You should use .value
in script when using Ref
.
This may help.
<script setup>
import { ref } from 'vue'
let value = ref(false);
function update() {
value.value = !value.value
console.log(value.value); // changed
}
</script>
<template>
<button @click="update">UPDATE</button>
<p>
{{ value }} - not changed
</p>
</template>
Source:stackexchange.com