--- title: Always Use .value When Accessing ref() in JavaScript impact: HIGH impactDescription: Forgetting .value causes silent failures and bugs in reactive state updates type: capability tags: [vue3, reactivity, ref, composition-api] --- # Always Use .value When Accessing ref() in JavaScript **Impact: HIGH** - Forgetting `.value` causes silent failures where state updates don't trigger reactivity, leading to hard-to-debug issues. When using `ref()` in Vue 3's Composition API, the reactive value is wrapped in an object and must be accessed via `.value` in JavaScript code. However, in templates, Vue automatically unwraps refs so `.value` is not needed there. This inconsistency is a common source of bugs. ## Task Checklist - [ ] Always use `.value` when reading or writing ref values in `