All jobs / Frontend / web developer / React

Frontend / web developer interview question · 0–1 years

What is the difference between props and state?

The strongest answer

Props are inputs passed from a parent and read-only in the child; state is data a component owns and changes over time, and changing it re-renders the component

Why it works

Right. Owned and mutable versus given and read-only.

What a good answer covers

Answers that fall short

Who gets asked this

More React questions