Implementation of React-Redux Hooks With Typescript

This article is a continuation of my previous article. If you are new to hooks and have directly arrived here, then I would suggest you to first check out that first article and then come here. In that way, you'll be able to understand everything in this article clearly.

If you know about the basics of hooks in React, like useEffect or useState, then you're probably good to go.

Introduction to React Hooks

React hooks offer us a simplified interface to many React features. This intro will focus on using to access the state and lifecycle of a React component. Hooks are available in React version 16.8.0 or later. To check the version of React your app is running, reference your package.json.

We'll walk through the implementation of React hooks in a simple React app. This app will consume the very developer-friendly Hacker News API and display two views: Top Stories and New Stories. We're going to use two hooks in our app — useState and  useEffect. Hooks are intended to be used in function components; this app will only use function components.