Event Bus

For situations where emitting an event to the parent component doesn’t make sense, Statamic has a global event bus. You can emit and listen to events directly on this which will be available to all Vue components.

// Emit from some component...
this.$events.$emit('event.name');

// Listen for it in another component...
this.$events.$on('event.name');

The event bus is intended to be used for Vue component communication. If you want to listen for Statamic driven “events”, you may want to check out Hooks.

Betterify this page on Github!