question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: eventBus

See original GitHub issue

Hi! In Vue3, vue instance no longer implement the event emitter interface.

So eventBus will no longer be available.

import Vue from 'vue';
const bus = new Vue();

bus.$on('xxx', '...');
bus.$emit('xxx', '...');

there’s a way to implement this event emitter/pubsub feature by composition-api?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Leecasoncommented, Jun 21, 2020

Thank you, I’ll just do it on my own project.

0reactions
antfucommented, Jun 21, 2020

I still recommend using mitt, as I can’t do any better than it. If you do ask for this feature anyway, the best solution I can have is to make a plugin @vueuse/mitt (which is basically the code I showed above). And it would still require you to install mitt.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EventBus Features - Open Source by greenrobot
All EventBus features at a glance: EventBus is tiny, battle-tested, highly performant & offers a Annotation based API, main thread delivery, & more....
Read more >
Amazon EventBridge Features | Event Bus
Amazon EventBridge Scheduler is a serverless scheduler that makes it easy to create, execute, and manage scheduled tasks at scale. You can reliably...
Read more >
greenrobot/EventBus: Event bus for Android and ... - GitHub
Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.
Read more >
Using the event bus - Quarkus
The asynchronous message passing feature allows replying to messages which is not supported by Reactive Messaging. However, it is limited to single-event ...
Read more >
Communicating with an Event Bus | CodePath Android Cliffnotes
There are many different libraries which attempt to enable the event bus model, ... EventBus has a few more advanced features than in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found