title: React Navigation onPress in own function
body: <p>I've implemented the React Navigation example as in the tutorial <a href="https://reactnavigation.org/docs/intro/" rel="nofollow noreferrer">https://reactnavigation.org/docs/intro/</a> and it works fine.</p>
  
  <pre><code>&lt;Button
    onPress={() =&gt; navigate('Chat')}
    title="Chat with Lucy"
  /&gt;
  </code></pre>
  
  <p>Instead of calling navigate direct in onPress, I want to call it in a separate function btnToChat. I've tried to call it with this.props.navigation.navigate, but it doesn't work. Do you have any suggestions? Thank you!</p>
  
  <pre><code>btnToChat(){
    console.log("test");
    this.props.navigation.navigate('Chat');    
  }
  render() {
    const { navigate } = this.props.navigation;
  return (
    &lt;View&gt;
      &lt;Button
        onPress={this._btnToChat}
      /&gt;
    &lt;/View&gt;
      );
    }
  }
  </code></pre>
  
  <p>The following error appears: undefined is not an object (evaluating this.props.navigation)</p>