title: Calling React function from stencil web component
body: <p>This is my react functional component</p>
  <pre><code>const goTo = () =&gt; {
      console.log(&quot;This method call.&quot;);
    };
  return (
      &lt;div&gt;
        &lt;div className=&quot;container&quot;&gt;
          &lt;otp-web-component
          callBack={() =&gt; goTo}&gt;
          &lt;/otp-web-component&gt;
        &lt;/div&gt;
      &lt;/div&gt;  
  )
  </code></pre>
  <p>This is stencil component</p>
  <pre><code>    @Component({
        tag: &quot;otp-web-component&quot;,
        styleUrl: &quot;my-component.css&quot;,
      })
      export class otpcomponent {
      @Method() CallBack:()=&gt;void; //calling this on button click
      
         @Listen(&quot;event.keydown.enter&quot;)
        goBack() {
     //  calling callback function here
         }
          render(){
            return(
             &lt;button
                class=&quot;btn btn-primary&quot;
                style={buttonStyle}
                onClick={this.goBack.bind(this)}
                &gt;
                 get
               &lt;/button&gt;
            )
          }
  </code></pre>
  <p>When clicking on get button in stencil component it should execute the react function goTo();</p>