Course contentsShow
← React
Lesson 217 of 2,3967. Props FundamentalsFree lesson

Props Flow Downward Only

Data flows from parent to child through props; children cannot directly modify parent data or pass data upward.

Props Flow Downward Only

What you'll learn: How data travels one direction in React — from parent to child — and why children can't send data back up through props.


The One-Way Street

Props are like a water fountain: water flows downward from the top to people below. A parent component passes props down to its children, but children cannot push props back up to their parents or pass them sideways to siblings.

function Parent() {
  const message = "Hello from Parent";
  
  return <Child greeting={message} />;
}

function Child(props) {
  // Child can READ props.greeting
  // But Child CANNOT change the parent's "message" variable
  return <p>{props.greeting}</p>;
}

The Child component receives greeting as a prop and can display it, but it has no way to modify the original message variable living in Parent.


Why This Matters

This one-way flow prevents chaos. Imagine if any component could change data anywhere else in your app — debugging would be a nightmare! You'd never know where changes came from.

With downward-only flow, you always know: if data changes, look at the component that owns it. The parent controls the data, and children just display or use what they're given.


What About Sending Data Upward?

You might wonder: "What if my child needs to tell the parent something?" That's a valid need, but it doesn't happen through props themselves. Children cannot reassign or mutate props to communicate upward. (You'll learn the proper pattern for this later.)


Key Takeaway: Props flow downward only — parents pass data to children through props, but children cannot modify parent data or send props back up. This one-way flow keeps your data predictable and easier to debug.