1. What is the Context API and how is it useful in state management?
The Context API provides a way to share values like theme or user data across components without prop drilling. You wrap parts of the app in a Provider and access the context value anywhere using useContext. It’s great for global data, but for complex scenarios, libraries like Redux offer more structure.