1.0.7 • Published 4 years ago
sio-eev v1.0.7
sio-eev
It's a small library (a wrapper
) over https://www.npmjs.com/package/eev
It has 2 methods:
subscribe
which returns a subscription back to be able to unsubscribe fromnext
to push data
import { eev } from 'sio-eev';
const subscription = eev.subscribe('anyEventThatYouWant', function callback(data) {
// everything you want inside
});
// to send data
eev.next('anyEventThatYouWant', { username: 'test', password: 'password' });
subscription.unsubscribe(); // free-up memmory when it is not used anymore.
import eev from 'sio-eev'
eev
it will be a single instance, therefore, if a message it is send from a micro-app to another micro-app and since both micro-apps are in the same application, the micro-apps can communicate througheev
.