Level 11
It's not working because laravel inertialJS uses Vue 3. It seems https://v3.vuejs.org/guide/migration/events-api.html#_3-x-update expains it. and we are told to use this https://github.com/developit/mitt
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Im trying to trigger an event from one component to the other but nothing gets triggered code below... im using laravel 8 with inertia and Vue Js
cancel(){
EventBus.$emit('cancelEditing', reply)
}
listen(){
EventBus.$on('cancelEditing', (reply) => {
this.editing = false
if(reply !== this.data.reply){
this.data.reply = this.beforeEditReplyBody
this.beforeEditReplyBody = ''
}
})
}
window.EventBus = new Vue();
any suggestions please
Please or to participate in this conversation.