Vue · Reactivity

VUE0006Use .value when refs are operands

Flags ref as operand in Vue reactivity code before it leaks into runtime behavior.

Why it happens

A ref object is not its contained value, so arithmetic and comparison against the ref can coerce the wrapper or produce the wrong result.

Fix

Remove ref as operand, or move it to the Vue runtime/API that owns that behavior.

Example

Read ref values before arithmetic

Before

<script setup lang="ts">
const count = ref(1)
const next = count + 1
</script>

After

<script setup lang="ts">
const count = ref(1)
const next = count.value + 1
</script>

Verify the fix

Run only this rule after editing so the report stays focused on the diagnostic you are closing:

pnpm vite-doctor . --framework vue --rules vue/reactivity/no-ref-as-operand
Copyright © 2026