As of React 16.8 our beloved functional components were repurposed to be more than just presentational functions that returned JSX. Before its upgrade functional components were not able to manage state nor have access to life cycle methods. But now all of that has changed and in the following example I will illustrate how your typical class component would like as a new and improved functional component using React Hooks.

Below is a typical class component that renders a list of names after an axios request. Recall that componentDidMount runs once AFTER the component has first mounted. …

Dennese Sanay

Fullstack Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store