Question 6 of 6Pro Only

What is the difference between props and state in React?

Sample answer preview

Props and state are both plain JavaScript objects that hold information affecting render output, but they differ in purpose and behavior. Props are inputs to a component, passed from a parent. They are read-only from the component's perspective.

propsstateimmutablelifting statedata flow

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 5+ more Frontend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime