Code for a tutorial to show you how to fetch data in React with Hooks by using the state and effect hooks.
We will use the widely known Hacker News API to fetch popular articles from the tech world.
You will also implement your custom hook for the data fetching that can be reused anywhere in your application or published on npm as standalone node package.