Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<script>
import { ref, computed } from 'vue'
export default {
setup () {
const a = ref(3)
const b = computed(() => a.value + 2)
const changeA = () => { a.value = 4 }
return { a, b, changeA } // have to return everything!
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment