You are a developer with previous experience using React, and you are comfortable using React class components. You’re so comfortable with class components to the point that switching to functional components sounds daunting. How are you going to set state? How can you access the react component lifecycle?

If this sounds like you, then this guide will help you begin transitioning your class components into functional ones. React hooks provide an ability to use state and lifecycle functions within functional components.

We will discuss two built in hooks: useState and useEffect.


A key difference between class and functional components is…

Danielle Arquisola

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