Beginner React Interview QuestionsBeginnerComparison
React · Question 8
What is the difference between props and state in React?
Direct answer
Props are inputs supplied by a parent, while state is component memory managed by React and updated by the component through state setters.
| Feature | Props | State |
|---|---|---|
| Source | Usually parent component | Component using a state Hook |
| Mutated directly? | No | No; use the state setter |
| Purpose | Configure a component | Remember changing information |
| Can trigger a render? | New props arrive during parent-driven rendering | A state update can schedule a render |
Both props and state should be treated as immutable snapshots for a particular render.