title: setParams not working in react-native
body: <p>I am using react-native with redux. I am trying to update current screen's params so that they can be accessed in a component used in top-bar but parameter is not getting set. 
  My code is following:</p>
  
  <p>Screen Route:</p>
  
  <pre><code>AlertNameForm: {
      screen: AlertNameForm,
      navigationOptions: ({navigation}) =&gt; CancelAndDone(navigation)
    }
  </code></pre>
  
  <p>Component Screen: In componentDidMount I am setting parameter.</p>
  
  <pre><code>class AlertNameForm {
      ..........
      componentDidMount() {
      this.props.navigation.setParams({onDonePress: this.onDonePress})
      }
  
      onDonePress: () =&gt; {
        // want to access this function in top-bar buttons.
      }
  }
  </code></pre>
  
  <p>Following is further components:</p>
  
  <pre><code>export const CancelAndDone = (navigation) =&gt; ({
      headerLeft: &lt;ButtonCancel navigation={navigation} /&gt;,
      headerRight: &lt;ButtonDone navigation={navigation} /&gt;
  })
  
  const ButtonDone = withTheme(({navigation, theme: { tertiaryColor } }) =&gt; (
    &lt;Button color={tertiaryColor} title="Done" onPress={() =&gt; {
        if (navigation.state.params &amp;&amp; navigation.state.params.onDonePress) {
          navigation.state.params.onDonePress()
        }
        else {
          navigation.dispatch(NavigationActions.back())
        }
      }} /&gt;
  ))
  </code></pre>
  
  <p>But in ButtonDone component I am not able to access function <strong>onDonePress</strong>
  Is there any other way to setParams for current screen in react-native.</p>