React Js Props

  • Props in React are used to pass data from a parent component to its child components.
  • They are like arguments passed to a function
  • The child component can access the prop values via the props object.

Below is  the example where App component passing props as “type=Apple” to Fruit function .



Hello, World!

This is a example of props in react.

Fruit type is : Apple

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top