![]() |
VOOZH | about |
In React, props are read-only data passed from one component to another. They are immutable, meaning a child component cannot modify them, only the parent can update the data. React follows a unidirectional data flow, where data moves from parent to child.
Syntax:
Here, the prop 'fullName' is passed with the value “Ashish Bhardwaj” to the 'App' component.
<App fullName = "Ashish Bhardwaj" />Now let's see an example to understand how props are passed and displayed.
Output: