Vue.js Event Bus

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Introduction

Event buses are a useful way of communicating between components which are not directly related, i.e. Have no parent-child relationship.

It is just an empty vue instance, which can be used to $emit events or listen $on the said events.

Syntax

  1. export default new Vue()

Remarks

Use vuex if your application has a lot of components requiring the data of each other.



Got any Vue.js Question?