I am facing an issue with a Vue component that has a single prop, which is an object. Despite changing a property in this object, it does not reflect the update in the Vue template.
Below is a simplified version of the component:
<template>
<p>{{ item.quantity }}</p>
</template>
<script>
export default {
props: {
item: {
required: true,
type: Object
}
}
}
</script>
Upon using vue-devtools in Google Chrome, I can observe that the quantity
property in my item
object is indeed getting updated. However, the template continues to render the default value (1
).
Do I need to take any additional steps for Vue to watch nested properties or something similar?