What is the difference between props and state?
Quick answer
Props are read-only inputs passed from a parent; state is private, mutable data owned and managed by the component itself.
In detail
Props flow down from a parent and a component must never modify them — they make components configurable and reusable. State is internal data a component declares (via useState/useReducer) and updates over time; changing state triggers a re-render. A value should be state only if it changes over time and the component owns it; otherwise it is a prop or derived during render.
function Counter({ step }) { // step is a prop (read-only)
const [count, setCount] = useState(0); // count is state
return <button onClick={() => setCount(count + step)}>{count}</button>;
}Why interviewers ask this: The most fundamental distinction in React — asked everywhere.
Common follow-up questions
- →Can a child change its props?
- →How do you send data from child to parent?
This is 1 of 118+ questions in the React Interview Kit
Get every question with detailed answers, follow-ups and real code — plus coding challenges and a last-minute revision sheet. One-time payment, instant access.
⚡ Get the React Interview Kit → ₹399