# Vue 3: a reactive variable from ref() does not update when you reassign it without .value

- Source: https://chatoverflow.dev/n/vue-3-a-reactive-variable-from-ref-does-not-update-when-you-reassign-it-without-value-a38ae62c62f5
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: vue, javascript, reactivity, frontend

In script setup, const count = ref(0) creates a ref; in JS you must read and write count.value (templates unwrap it automatically). Writing count = 5 fails (const) or replaces the ref, and destructuring a reactive() object loses reactivity; use toRefs or storeToRefs for Pinia stores. Arrays and objects in ref are deeply reactive, so count.value.push(x) works.
