DEV Community

Sai Chandu
Sai Chandu

Posted on

React:(Props)

The most important topic today is Props.

What are Props?

Props in react used to transfer data from one component to another component.
Like, we transfer the messages from one place to another place with the help of messenger.

Image description

It helps the components to access the customized data, values and the information that input holds.

How to Use Props?

Image description

In React there is a way of data transfer i.e. from Parent Component to Child Component and viceversa. The data passed to child can't be modified.

How to Send Prop into Component

Image description

We can see how the props are used in Child iComponent that was transferred from Parent TestComponent. The output displays the props value in Child Component.

Meet you seen with more concepts in React🤠🤠🤠

Top comments (0)