Refactoring a component to use React hooks

(Jack Franklin) React 16.8 introduced hooks; a new way to work with effects and state in React. No longer do React components that have state need to be ES2015 classes that extend React.Component – hooks let us write components as functions and still have all the functionality of class based compone