Skip to content

Instantly share code, notes, and snippets.

View kevinfilteau's full-sized avatar

Kevin Filteau kevinfilteau

View GitHub Profile
@kevinfilteau
kevinfilteau / reactor.js
Last active April 15, 2019 12:39 — forked from mohsen1/reactor.js
Reactor Pattern in JavaScript ES6
class ReactorEvent {
constructor(name) {
this.name = name;
this.callbacks = [];
}
registerCallback(callback) {
this.callbacks.push(callback);
}
}