I have this in vue 3. I need to change the title using the prop id if is 0 should be 'New' else 'Details' based on another computed property that I have editMode
setup(props) {
const {id} = toRefs(props)
const editMode = computed(() => {
return id.value !== 0
})
const title = computed(() => {
return editMode ? 'Details' : 'New'
})
}
the problem is when editMode is false the title is not changing ..... remains 'Details' all the time.
Any idea ?