๐Ÿ”€ React

Props vs State in React โ€” The Difference That Clicks

๐Ÿ“… Jun 12, 2026 โฑ 3 min read

The first React interview question, and the concept everything else builds on.

The analogy

Props are arguments; state is memory. A component receives props from its parent (read-only, like function parameters) and owns its state (private, changeable).

function Parent() {
  const [theme, setTheme] = useState("dark");   // STATE โ€” Parent owns it
  return <Child theme={theme} />;               // passed down as PROP
}

function Child({ theme }) {
  // theme is a PROP โ€” Child can read it, never change it
  return <div className={theme}>...</div>;
}

The rules

Lifting state up

When two siblings need the same data, move the state to their common parent and pass it down to both. When many distant components need it โ€” that is what Context (or Redux/Zustand) solves.

Continue: React interview questions.

โ† All Articles