bus-event is a simple package for passing easily your event.
npm install bus-event
or
yarn add bus-event
Just import the package before start using it.
As a ES6 Module:
import BusEvent from 'bus-event';
Now here we have two methods to complete our work.
When you will fire your event by bus event.
BusEvent.$emit('some_key', {
// something
})
When you will receive your event by bus event.
BusEvent.$on('some_key', (e) => {
// something
})
If you encounter any bugs or issues, feel free to open an issue at github.