React-Hooks
A React Hook is a special function provided by React that allows you to "hook into" React's features and lifecycle methods from functional components. In other words, The objective of Hooks is for LCM (Lifecycle Management) of React Component
Rules of Hooks
Call hooks only at the top level: Do not call hooks inside loops, conditions, or nested functions. Call hooks only in React functional components or custom hooks.