Custom event implementation use plain javascript
Event.on("eventName", fn);
Event.emit("eventName", [args]);
Event.unsubscribe("eventName");
function handler(msg) {
console.log(msg);
}
Event.on("data:stored", handler);
Event.emit("data:stored", "Data were already stored!");
//output: "Data were already stored!"