Hooks let you use state and other React features in functional components. They were introduced in React 16.8 and have become the standard way to build React applications.
useState
Manages local component state. Returns a stateful value and a function to update it.
useEffect
Handles side effects like data fetching, subscriptions, and DOM manipulation. Runs after render and can clean up before the component unmounts.
useContext
Accesses context values without prop drilling. Useful for sharing global data like themes or user authentication.
useRef
Creates a mutable reference that persists across renders. Commonly used for accessing DOM elements or storing values that shouldn't trigger re-renders.
Custom Hooks
Extract and reuse stateful logic between components. Custom hooks are functions that use other hooks and follow the naming convention "use-".