title: React Native undefined is not an object (evaluating 'this.onPressButton.bind')
body: <p>For so "onPress={this.onPressButton.bind(this)}" cause my application to fail?</p>
  
  <p>What can I do to fix it. I believe its something to do with (this) becoming unbinded or something?</p>
  
  <p>I have a component called Login being rendered:</p>
  
  <pre><code>export default class Login extends Component {
  
  constructor(props) {
      super(props);
      this.state = {
          id:'login'
      }
  }
  
  render() {
      return(
          &lt;KeyboardAvoidingView behavior="padding" style={style.container}&gt;
              &lt;View style={style.logoContainer}&gt;
                  &lt;StatusBar barStyle="light-content" /&gt;
                  &lt;Image style={style.logo} source={require('../../image/Octocat.png')} /&gt;
                  &lt;Text style={style.logoText}&gt; A Github app using React Native by{"\n"} Thomas Charlesworth&lt;/Text&gt;
              &lt;/View&gt;
              &lt;View style={style.formContainer}&gt;
                  &lt;LoginForm /&gt;
              &lt;/View&gt;
          &lt;/KeyboardAvoidingView&gt;
      );
  }
  }
  </code></pre>
  
  <p>And a login form component:</p>
  
  <pre><code>export default class LoginForm extends Component {
  
  onPressButton(){
      this.props.navigator.push({
          id: 'splash',
          passProps: {
          // Your Props
          }
      })
  }
  
  render() {
      return(
          &lt;View style={style.container}&gt;
              &lt;TextInput 
                  style={style.input} 
                  placeholder="Username" 
                  placeholderTextColor="rgba(255,255,255,0.5)"
                  returnKeyType="next"
                  autoCapitalize="none"
                  autoCorrect={false}
                  onSubmitEditing={()=&gt; this.passwordInput.focus()}
              /&gt;
              &lt;TextInput 
                  style={style.input} 
                  secureTextEntry 
                  placeholder="Password" 
                  placeholderTextColor="rgba(255,255,255,0.5)"
                  returnKeyType="go"
                  ref={(input) =&gt; this.passwordInput = input}
              /&gt;
              &lt;TouchableOpacity 
                  style={style.buttonContainer}
                  onPress={this.onPressButton.bind(this)}
              &gt; 
                  &lt;Text style={style.buttonText}&gt;
                      LOGIN
                  &lt;/Text&gt;
              &lt;/TouchableOpacity&gt;
          &lt;/View&gt;
      );
  }
  }
  </code></pre>