React Lecture - 4
React Lecture - 4
Props
Props
What are Props ?
React components use props to communicate with each other. Every parent
component can pass some information to its child components by giving them
props.
Props might remind you of HTML attributes, but you can pass any JavaScript
value through them, including objects, arrays, and functions.
The attribute name corresponds to the prop name, and the value assigned
becomes the prop value.
Passing Props to a Component
You can access the props value in the Component
by adding a props parameter to the function.