You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For convenience, this package now provides a default global dispatcher that can be used with On() and Emit() package-level functions.
// Subcribe to event A, and automatically unsubscribe at the enddeferevent.On(func(eEvent) {
println("(consumer)", e.Data)
})()
// Publish few eventsevent.Emit(newEventA("event 1"))
event.Emit(newEventA("event 2"))
event.Emit(newEventA("event 3"))