title: React Native custom header component navigation
body: <p>I'm using react-navigation and trying to implement a custom header will be visible on every page. tried to follow the example in this link and it's all good. My header is displayed, but now i'm trying to navigate back to the home screen using the HOME link in the header navigation is not happening.</p>
  
  <p><a href="https://stackoverflow.com/questions/56844711/react-native-react-navigation-use-the-same-header-component-in-every-screen">React Native: React Navigation - use the same header component in every screen?</a></p>
  
  <p>When debugging my header component i can clearly see the navigation prop but not sure why it's not navigating. My code is below. any help appreciated.</p>
  
  <p>Creating stack navigator</p>
  
  <pre><code>const AppNavigator = createStackNavigator({
   Home: {
    screen: MeetingList,    
  
   },
   MeetingDisplay: {
    screen: MeetingDisplay
   }
   },{
     initialRouteName: "Home",
     defaultNavigationOptions: ({ navigation }) =&gt; {
         return MyHeader(navigation)
     }  
   });
  </code></pre>
  
  <p>Custom header component</p>
  
  <pre><code>const MyHeader = (navigation) =&gt; {
     return {
         header: props =&gt; &lt;Header navigation= {navigation} /&gt;,
         headerStyle: { backgroundColor: '#000' },
         headerTintColor: '#000',
     };
   }
  </code></pre>
  
  <p>My header component</p>
  
  <pre><code>import React from 'react';
  import { Text, View, } from 'react-native';
  
  class Header extends React.Component {
      constructor(props) {
         super(props);
         /  /this.params = props.navigation.state.params;
         this.state = {
  
         }        
       }
  
  render() {
      const { navigation } = this.props;
      return (
          &lt;&gt;
              &lt;View&gt;
                  &lt;Text onPress={()=&gt; navigation.navigate('MeetingList')}&gt;HOME&lt;/Text&gt;
              &lt;/View&gt;
          &lt;/&gt;
      )
     }
  }
  
   export default Header;
  </code></pre>