What are React hooks, and how do they work?
React Hooks are functions introduced in React 16.8 that allow developers to use state and lifecycle features in functional components without needing class components. The most commonly used hooks include useState, which enables state management by returning a state variable and a function to update it, and useEffect, which handles side effects lik