5 custom React hooks you should discover right now! 🔥

1️⃣ react-use-form-state

Can you imagine your web app without any form? No!
Forms are universally, even we have to encounter forms and maintain their state in the smallest of applications. In React managing form state can be a bit clumsy sometimes.

react-use-form-state is an excellent library to help you easily manage your form state.

Example of usage:

2️⃣ use-redux

Redux is very popular for state management. Usually, developers utilise Redux when they have reasonable amounts of data changing over time.

It produces a testable and clean layout to the table using a completely functional approach.

Example of usage:

3️⃣ use-onClickOutside

Well, the next one is use-onclickoutside. It introduces you a way to recognise if the user clicks a specific component or everything. I am pretty sure you have seen this style when opening a modal or a dropdown menu or a dropdown list.

Example of usage:

4️⃣ Use HTTP

What if you can handle loading, error, and success states yourself in just a line of code? Pretty cool right?

well, instead of using await fetch() just use the useFetch() of use-http ! Done!

Example of usage:

5️⃣ react-firebase-hooks

The last one is the react-firebase-hooks. Most of us use firebase in our projects for authentication, smooth storing and retrieval of dynamic contents.

useAuthState hook is a great choice for authentication.

Example of usage:

Give a 👏 if this article helped you!

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Learn React by Building an Expense Tracker App: Rendering Lists of Data

Building my first Stencil.js component

6 console.log() alternatives to ease up your workflow.

How to add a toggle button to show different results in JavaScript

Quick walkthrough to the new ES6 syntax making developer’s job easy

Things I wish I knew earlier while learning NodeJS

Using Hooks for Lazy-Loading Images in React

Arduino BLE as IoT

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
Md. Tazwar Islam

Md. Tazwar Islam

More from Medium

The Plan for React 18…..

React, ViteJS, TypeScript, and Jest

React Can Increase the Functionality of Your Web Pages 10 Fold

Up and running with Styled-components