Problem Statement
What are state and props in React? Compare them.
Explanation
Props are external and passed to components; they can’t be modified inside. State is internal data managed within a component using hooks like useState(). Props are for communication, while state is for managing local changes.