1153 Views
So, since I've been swamped with work recently and haven't posted much, I'd like to get back into the swing of things and throw up a simple EventEmitter implementation I put together for my current ngReflux project I'm working on. ngReflux is a Flux implementation for use with AngularJS applications and based on Mikael Brassman's original gist idea for RefluxJS. You can read more about the Flux architecture elsewhere. Since Reflux removes the Dispatcher from the Flux flow altogether, it makes both Actions and Stores observables by having them prototypically inherit from an EventEmitter. Reflux uses EventEmitter3, which is a full implementation for Node and the browser; but I wanted to keep this small and simple, with few outside dependencies, so I rolled my own.