[Vuejs]-Event between components vuejs / laravel

1πŸ‘

  1. In the line
$eventBus.$on('teste', this.selected)

instead of this.selected there should be a handler at least an arrow function:

$eventBus.$on('teste', e => this.selected = e)
  1. Don’ try to change props that are passed from a parent component. If you wish to change a prop value you need to emit an event with a new value and a parent component has to catch this event and change a prop value to a new one (passed with an event).
πŸ‘€Anatoly

Leave a comment