logo
React Hooks - Interview Questions and Answers
What is the difference between state and props in React?
Both the state and props are JavaScript objects. They are different in their functionality regarding the component.

State Props
States are managed within the component, similar to variables declared within a function. Props get passed to the component similar to function parameters.
State is mutable(that is it can be modified). Props are immutable(that is they cannot be modified).
You can read as well as modify states. Props are read-only.