Pub / sub with SignalR and Vue (Native Vue Plugin)


#1

Hey guys. I’m the author of SignalR.EventAggregatorProxy. Its a event aggregation (pub/sub) library for SignalR. It acts as an abstraction between any service bus, queue or event aggregator and seamlessly publish events to the clients. It even has a javascript proxy that outputs your server side messages as Javascript types on the client.

The plugin is super easy to use. Just install it using unpkg: signalr.eventaggregatorproxy.vue

Install it in Vue: Vue.use(signalR);

You can now listen to server side events from your vm by calling
this.subscribe(MyApp.MyEvent, this.onEvent);

Or publish clent side events by doing
this.publish(new ClientEvent());

The plugin unsubscribes itself when the vm is destroyed so the dev can worry about other stuff :smiley:

cdn: here

Full doc: here

ASPNET Core doc: here