DEV Community

Discussion on: How to Pass Data From One Component to Other Component in React?

Collapse
 
p4pranav profile image
Pranav Rai

I have one question, please advise me on that!

Suppose, ParentComponent.js has some content and ChildComponent.js has some content. And, when i am passing data from parent to child, i don't want to show the ChildComponent.js content inside the ParentComponent.js

Collapse
 
dipakkr profile image
Deepak Kumar

Let's understand the hierarchy if I understood your question.

Now, you are saying that I don't want to show content of child in parent. If the strucuture of Child -parent will be this, then the child content will be visible inside parent.