Level 1
looking at the inertiajs documentation i was able to solve the problem by modifying the code like this
export default {
data() {
return {
visible: false,
}
},
watch: {
toast: {
deep: true,
handler(val, oldVal) {
console.log(val)
},
},
},
computed: {
toast() {
return this.$page.props.toast
},
},
}