How to Reuse Logic with React Hooks | Hacker News Reader