title: How to trigger an event in Parent Component from Child Component onClick() using React Hooks?
body: <p>Below is my code in React Hooks:</p>
  
  <p>I have three React functional components Parent, Child1, Child2.
  I want to click a button in Child2 component and that should invoke a function in Parent component. How this can be achieved ?</p>
  
  <pre><code>function Child2({Open, close, events, onEvent}) {
  
  const passEventToParent = () {
  // callback to parent using onEvent
  }
  
  &lt;Button onClick={passEventToParent}&gt;
  
  }
  
  function Child1({open, close, events, onEvent}) {
  &lt;Child2 /&gt;
  
  }
  
  function Parent({open, close, events, onEvent}) {
  
  // I want call below function based on the button clicked in Child2 React functional component
  runEvent();
  
  &lt;Child1 /&gt;
  
  }
  </code></pre>