Skip to content

Instantly share code, notes, and snippets.

@mattmaribojoc
Created May 14, 2021 02:09
Show Gist options
  • Save mattmaribojoc/a81942d8b127d4a1a8db092f12a7322c to your computer and use it in GitHub Desktop.
Save mattmaribojoc/a81942d8b127d4a1a8db092f12a7322c 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