frontend > app

This commit is contained in:
Tom Moor
2017-10-25 22:49:04 -07:00
parent aa34db8318
commit 4863680d86
239 changed files with 11 additions and 11 deletions

19
app/stores/BaseStore.js Normal file
View File

@@ -0,0 +1,19 @@
// @flow
import { EventEmitter } from 'fbemitter';
import _ from 'lodash';
const emitter = new EventEmitter();
window.__emitter = emitter;
class BaseStore {
emitter: EventEmitter;
on: (eventName: string, callback: Function) => void;
emit: (eventName: string, data: any) => void;
constructor() {
_.extend(this, emitter);
this.on = emitter.addListener;
}
}
export default BaseStore;