vue-epic-bus
Emit and subscribe to global bus from your components
Gist
- Minimal boilerplate.
- Vue flavor.
- Can't be used outside of vue components (intended).
- No memory leaks.
Installation
- Add to dependencies:
yarn add vue-epic-bus// ornpm i vue-epic-bus
- Install plugin
// main.jsVue
Usage
Subscribe:
Emit:
$cast
could be used from template.
Update
If you're unhappy with default word choice for $cast
and subs
you can change it via plugin options:
Vue