Making an Imperative API Declarative using React | Hacker News Reader