title: Call Child Method from Parent with react-native
body: <p>I know that this is a pretty common question but some answers I found on the internet are deprecated.
  How do you call a method of a Child Component from the Parent Component in 2020?<br>
  My actual code is something like this but it's not working  </p>
  
  <p>Child:</p>
  
  <pre><code>export default class CustomComp extends React.Component{
    exampleMethod = () =&gt; {
      console.log('pressed');
    };
  
    render(){
      return (
        ...
      );
    }
  }
  </code></pre>
  
  <p>Parent:</p>
  
  <pre><code>export default class App extends React.Component{
    child = CustomComp;
    render(){
      return (
        &lt;View style={styles.container}&gt;
          &lt;Button title="Press" onPress={this.child.exampleMethod} /&gt;
          &lt;CustomComp ref={child =&gt; {this.child = child}} {...this.props} /&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>