React Props

Let's learn about React props. First of all, have a look at this React code:

function Page() {
    return (
            <h1>Hello World</h1>
            <Welcome name="Arunoda" age={92} />

As you can see, here we pass some values into our Welcome component. These values are props. We can pass any JavaScript value as a prop. Then the Welcome component can use these props to render whatever it wants.

Let's explore how to do that.

🙏 We need your help

We need your help to keep maintain & add new content to this course. Here's how you can support us: