title: how to update parent's state from child component along with passing some information from child
body: <p>I am trying to build a portal where I have 3 components. </p>
  
  <p>Parent component</p>
  
  <p>->Child 1</p>
  
  <p>->Child 2</p>
  
  <p>From main component</p>
  
  <p>-if (no files are selected) then GUI should show just the Child 1 and 
   Count and pathnames of files associated with Application</p>
  
  <p>-else if (user has clicked on any file) then GUI should show the filename and 
   nodes associated to it. </p>
  
  <p>I am trying to achieve this but i am confused in how to pass info from parent to child and vice versa. </p>
  
  <p>In the code given below in Child 1.js when user click on path, the Parent component should update the GUI view by calling Child2 rather than calling Child1 .</p>
  
  <p>How can i achieve this? </p>