Given the following code snippet:
props: {
id: {
type: String,
default() {
return this.$route.params.id;
},
},
},
If the parent component does not pass a value, one would expect the id prop to update whenever the route changes to a new id. However, it appears that is not happening in reality. Is my understanding accurate? Is there a way to make the id prop reactive in this scenario? Otherwise, I am considering setting required: false and creating a computedId field, although I prefer handling it directly within the props section.