Vue · Reactivity
vite-doctor/vuereactivitywarnSuggestion
Why it happens
Returning ref.value gives callers a snapshot; returning the ref preserves updates and lets callers compose it with Vue reactivity.
Fix
Use the Vue-supported composable ref return pattern instead.
Example
Return refs from composables
Before
export function useCounter() {
const count = ref(0)
return count.value
}
After
export function useCounter() {
const count = ref(0)
return count
}
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/prefer-composable-ref-return