I leveraged the Flux architecture powered by the
immensely popular Redux library. For a cleaner
integration with Angular 2’s injector and TypeScript’s
type system, I wrote a class-based wrapper around Redux
that exposes state changes using RxJS observables.
Consumers can subscribe to these observables and use the
Store class to dispatch state-changing actions.
This reads like a Markov chain generated from a pool of top voted Hacker News Javascript submissions.