This code is from a VueMastery course, which must be outdated:
export default {
setup(props, {emit}){
let email = props.email;
let toggleRead = () => {
email.read = !email.read
axios.put(`http://localhost:3000/emails/${email.id}`, email)
}
...
It gives this error:
71:9 error Getting a value from the `props` in root scope of `setup()` will cause the value to lose reactivity vue/no-setup-props-destructure
Note that I am not dealing with const here. What is the correct way to make a prop value reactive in Vue 3?