Props
In one line
Props (properties) are read-only inputs passed from a parent component to a child component to configure its behavior or content.
In simple words
Props are the mechanism for passing data down the component tree. A parent component passes props to a child by writing them as attributes in JSX, just like HTML attributes: <Avatar user={user} size="large" />.
Inside the child, props arrive as a plain JavaScript object. They are read-only — a component must never modify its own props. If data needs to change, the parent should pass new props, or the child should use state.
Props flow in one direction: top-down (parent → child). This unidirectional data flow makes React apps predictable and easier to debug. To send data back up, you pass callback functions as props.
Example
function Welcome({ name, age }) {
return <p>{name} is {age} years old.</p>;
}
// Parent passes props
<Welcome name="Alice" age={30} />The parent passes name and age as props. The child destructures them from the props object and renders them.
Common confusions
Confused with: state
The difference: Props are passed from the parent and are read-only. State is internal to the component and can be changed with setState. Props are like function parameters; state is like local variables.
Related terms
Related Resources
Related Lessons
- Props
Learn how props work and how to pass data between components.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.