Programming is a lifelong learning journey, and most of that journey is asking Questions.
And one of the Q i've asked while learning React is How To pass a component as Props?
.
In this short Tutorial we will pass a simple React component (Hello) to The App component as props
Pass it as a Prop
And This is How we use it in App Component.
Components Must Start with an upper case letter.
That's why we rename it Here
That's it Easy Peasy Lemon Squeezy 😎
So this is a Simple Exp though, but when it comes to large Apps, you will definitely need to use this.
Hope you like this Tuto
Top comments (0)