title: Add button to header of React Navigation header
body: <p>I have this compononet of mine ... where i want to draw a logout button and also hide the back arrow . but i am not able to do so . Can anyone tell me where i am doing it wrong? I have followed the original documentation of react navigation as well but no solution.</p>
  
  <pre><code>class Welcome extends React.Component {
    constructor(props) {
      super(props)
      this.state = {
        user: this.props.navigation.state.params.user,
       }
    }
  
    static navigationOptions = ({ navigation}) =&gt;  {
      const { params = {} } = navigation ; 
      return {
        headerTitle : "Welcome",
        headerLeft: null,
        headerRight : (
          &lt;TouchableOpacity
           style={{ backgroundColor: '#29434e' , padding: 10}}
           onPress={() =&gt; params.onlogout}
         &gt;
           &lt;Text style={{ marginVertical:5, color: 'rgba(255,255,255,0.7)', fontSize: 20,}}&gt; Logout &lt;/Text&gt;
         &lt;/TouchableOpacity&gt;   
        ) 
      };
    };
  
    _Logout = () =&gt; {
     this.props.Signout();
    };
  
    componentDidMount() {
      this.props.navigation.setParams({ onlogout : this._Logout , isSaving: false})
    }
  
      }
  }
  
  const mapDispatchToProps = (dispatch) =&gt; {
    return {
      Signout: () =&gt; dispatch(Signout())
    }
  }
  
  export default connect(null,mapDispatchToProps)(Welcome)
  </code></pre>