← React Beginner Questions - Set 7 Q67

How do you pass data from a parent to a child component?

React Beginner Questions - Set 7

Example

function Child({ message }) {
  return <p>{message}</p>;
}

function Parent() {
  return <Child message="from the parent" />;   // props down
}

What to notice

← Back to the question list