Bus
This tool allows you to communicate inside the application through a bus event. These events are emitted globally.
The external library used is mitt
. (See mitt documentation here)
Usage
How to emit an event :
import { Bus } from '@/lib';
Bus.emit('component:myEvent');
How to receive an event :
Bus.on('component:myEvent', () => {
// Do something
});