Why do we need custom hooks in React?

Why do we need custom hooks?

The answer is we don’t and we do. It depends. If you want to make your code more concise and neat, adopting custom hook may help you.