vue-event-hub

1.0.3 • Public • Published

vue-event-hub

A global event hub for Vue.js . Here is a reason for using this package.

Install

you can install it via npm: npm install --save vue-event-hub

Usage

import Vue from 'vue';
import EventHub from 'vue-event-hub';
Vue.use(EventHub);
    
//listen
this.$eventHub.on('SOME_EVENT',(data)=>{console.log('it is a callback')});

//fire
 this.$eventHub.emit('SOME_EVENT','some data');

License

MIT

Dependents (3)

Package Sidebar

Install

npm i vue-event-hub

Weekly Downloads

189

Version

1.0.3

License

MIT

Unpacked Size

3.83 kB

Total Files

5

Last publish

Collaborators

  • guanmac