Manage State Easier With React Hooks

Photo by Filiberto Santillán on Unsplash

React hooks have allowed us to simplify how we write components, and has given us to create new ways to manage state in our applications. However, state management in class components had some advantages in accessing state as soon as it updated. This could be achieved by passing a function to ‘setState’ to access the updated value right after state was changed. This was helpful since when react updates asynchronously. We can…