emit in nuxt vue3 code example
Example: nuxt js emit event
$nuxt.$emit('my-custom-event') // to emit an event
created() { listen to an event anywhere in the nuxt app
this.$nuxt.$on('my-custom-event', () => {
//Do Something
})
}
$nuxt.$emit('my-custom-event') // to emit an event
created() { listen to an event anywhere in the nuxt app
this.$nuxt.$on('my-custom-event', () => {
//Do Something
})
}