The store is a small abstraction over the Hacker News API. It uses Firebase and an EventEmitter to support real-time updates. The real-time updates are chocked when the window is not visible. Visibility is detected with the native page visibility API. A simple Map is used for caching. The store is exposed globally, which in my opinion is acceptable for a project of this scale.