Props vs State in React
The most fundamental distinction in React, and a guaranteed interview question. Props are inputs; state is internal, changeable data.
Who owns the data
Props are read-only inputs passed down from a parent — a component must never modify its own props. State is private data a component declares and updates over time; changing it triggers a re-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>;
}How to decide
A value should be state only if it changes over time AND the component owns it. If it comes from a parent, it's a prop. If you can compute it from existing props/state, derive it during render — don't store it.
Get the complete React question bank
Props, state, hooks and rendering — 75+ questions with 'why interviewers ask this' in the React Interview Kit.
⚡ Get the React Interview Kit → ₹399Frequently asked questions
- Can a child change its props?
- No. Data flows down via props; to change something a parent owns, the child calls a callback the parent passed down (events flow up).
- How do you send data from child to parent?
- The parent passes a function as a prop; the child calls it with the data. React enforces this one-way flow.
