React hooks API provides functionality for flow control, state management, and component lifecycle when using functional components.
Rules are simple:
You can call hooks only inside React function components or custom hooks
Hooks are functions that always starts with “use” word followed by a “superpower”.
There are several built-in React hooks and you can compose them into custom hooks for a specific use case in your application. …