Props (short for properties) are inputs to React components. They allow you to pass data from a parent component to a child component, making your UI dynamic and reusable.
Think of props as arguments you pass to a function. Inside the child component, you can access props via the props
object.
In this example, the Greet
component receives the prop name
from App
and uses it to display a personalized greeting.
Remember, props are immutable. A component must never change its own props — it should only use them to render content.
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!