Vue · VUE0006

Use .value when refs are operands

Flags ref as operand in Vue reactivity code before it leaks into runtime behavior.
VUE0006vite-doctor/vuereactivityerrorSuggestion

Run this rule

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

Why it matters

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

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>
Copyright © 2026