title: React native two way binding with another component
body: <p>I just learning react native for three weeks and i have difficulty to update custom controller value based on the state in the parent.</p>
  
  <p>Here is the fiddle:<a href="https://www.rnplay.org/apps/_P-TXA" rel="nofollow" title="fiddle">js fiddle to react native</a></p>
  
  <p>In the code, when i type from custom control input, the parent input got updated. But when i type from the parent input, the custom control input is not updated.</p>
  
  <p>Can you point out my mistakes please?</p>
  
  <p>Also here is my code:</p>
  
  <pre><code>var React = require('react-native');
  var {
      AppRegistry,
      StyleSheet,
      Text,
      View,
      TextInput
  } = React;
  
  var CustomControl = React.createClass({
      propTypes: {
          onChangeTextValue: React.PropTypes.func,
          value: React.PropTypes.string.isRequired
      },
  
      getDefaultProps: function() {
          return {
              onChangeTextValue: () =&gt; { },
              value: ""
          }
      },
  
  getInitialState: function() {
      return {
          text: this.props.value
      };
  },
  
  setText: function(value) {
      this.setState({
          text: value
      });
      try {
          return this.props.onChangeTextValue(value);
      } catch (_error) { }
  },
  
  render: function(){
      return (
          &lt;TextInput
              style={{ height: 40, borderColor: 'gray',
                       borderWidth: 1 }}
              onChangeText={this.setText}
              value={this.state.text}
              /&gt;
          )
      }
  });
  
  var SampleApp = React.createClass({
      getInitialState() {
          return {
              'textValue': ''
          }
      },
      render: function() {
          return (
             &lt;View style={styles.container}&gt;
                &lt;Text&gt;
                    Parent Input
                &lt;/Text&gt;
                &lt;TextInput
          style={{height: 40, borderColor: 'gray', borderWidth: 1}}
          onChangeText={(text) =&gt; this.setState({textValue:text})}
          value={this.state.textValue}
                /&gt;
                &lt;Text&gt;
                    Custom control input
                &lt;/Text&gt;
  
                &lt;CustomControl
          onChangeTextValue={(text) =&gt; this.setState({textValue:text})}
                  value={this.state.textValue}
                /&gt;
  
                &lt;Text style={styles.instructions}&gt;
                    Updating the parent input should update the custom control value too. Right now only when we update the custom control value, the parent input is updated.
                &lt;/Text&gt;
  
            &lt;/View&gt;
          );
      }
  });
  </code></pre>
  
  <p>Thank you :)</p>