What is the purpose of the useState hook?
It lets you add state to functional components.
What does the useEffect hook do?
It performs side effects (like data fetching, DOM manipulation, etc.) in functional components.
Explain the useReducer hook and its use cases.
useReducer is an alternative to useState that’s more suited for managing complex state logic. It accepts a reducer function and an initial state, returning the current state paired with a dispatch method.