Skip to content

Instantly share code, notes, and snippets.

@mattmaribojoc
Last active May 14, 2021 15:31
Show Gist options
  • Save mattmaribojoc/c86d852cad918797cda29f524bb44e44 to your computer and use it in GitHub Desktop.
Save mattmaribojoc/c86d852cad918797cda29f524bb44e44 to your computer and use it in GitHub Desktop.
<script setup>
import { ref, computed } from 'vue'
// all of these are automatically bound to the template
const a = ref(3)
const b = computed(() => a.value + 2)
const changeA = () => { a.value = 4 }
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment