title: how to listen button click event in react?
body: <p>I am using the package below to generate a form dynamically in react:</p>
  
  <p><a href="https://www.npmjs.com/package/react-formio" rel="nofollow noreferrer">https://www.npmjs.com/package/react-formio</a></p>
  
  <p>I found one example  where <code>on button click, an event is listening</code>
  <a href="https://jsfiddle.net/Formio/obhgrrd8/?utm_source=website&amp;utm_medium=embed&amp;utm_campaign=obhgrrd8" rel="nofollow noreferrer">https://jsfiddle.net/Formio/obhgrrd8/?utm_source=website&amp;utm_medium=embed&amp;utm_campaign=obhgrrd8</a></p>
  
  <p>I want to do same thing in <code>react</code> using the above package
  here is my code</p>
  
  <p><a href="https://codesandbox.io/s/lucid-austin-vjdrj" rel="nofollow noreferrer">https://codesandbox.io/s/lucid-austin-vjdrj</a></p>
  
  <p>I have three buttons I want to listen <code>button click event</code></p>
  
  <pre><code>ReactDOM.render(
    &lt;Form src="https://wzddkgsfhfvtlmv.form.io/parentform" /&gt;,
  
    // &lt;Form src="https://peb3z.sse.codesandbox.io/abc" onSubmit={(i)=&gt;{console.log(i)}} /&gt;,
    rootElement
  );
  </code></pre>