ON THIS PAGE 

Ref()

Ref() Function

2025-01-28


Description

  • Used to make primitive vals reactive
  • Auto-imported

Usage

<script setup>
const count = ref(0)

function increment() {
  count.value++
}
</script>

<template>
  <button @click="increment">Count is: {{ count }}</button>
</template>

Copyright @ 2025 Anne Brown