---
title: "Comment by Egor V on \"Vue 3 Reactivity Explained: A Deep Dive into the \"ref\" Function\" | Hashnode"
description: "In this implementation if we try to create a ref with an object as a value (e.g. const test = ref({ count: 2 })) and then, if we change the value (e.g. test.val"
url: "https://hashnode.com/posts/deep-dive-into-vue-3-ref-function/64be75d715f373412d5c760b/comment/6651a48af504574e90219a63"
---

[Discussion](https://hashnode.com/posts/deep-dive-into-vue-3-ref-function/64be75d715f373412d5c760b)

Comment [Vue 3 Reactivity Explained: A Deep Dive into the "ref" Function](https://hashnode.com/posts/deep-dive-into-vue-3-ref-function/64be75d715f373412d5c760b)

[Egor V](https://hashnode.com/@EV1992)

[May 25, 2024](https://hashnode.com/posts/deep-dive-into-vue-3-ref-function/64be75d715f373412d5c760b/comment/6651a48af504574e90219a63)

In this implementation if we try to create a ref with an object as a value (e.g. const test = ref({ count: 2 })) and then, if we change the value (e.g. test.value.count = 4) the setter (and accordingly the effect) WON'T BE triggered. I guess it's ok, because the setter tracks only the value changes but we try to change a property of the value. The intresting thing is it works in a different way in Vue and the setter WILL BE triggered in this case. It would be nice to know why and how they implemented it.
