title: Why am I getting 'Cannot read property 'push' of undefined' (React Native)?
body: <p>In my index.ios.js, I have the following:</p>
  
  <pre><code>  renderScene(route, navigator){
      return &lt;route.component navigator={navigator} {...route.passProps}/&gt;
    }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>render() {
      return (
        &lt;Navigator
          initialRoute={{name: 'FirstPage', component: FirstPage}}
          renderScene={this.renderScene}
        /&gt;
      );
    }
  </code></pre>
  
  <p>then in my FirstPage.js, to navigate to the SecondPage.js: </p>
  
  <pre><code>  _navigate(){
      this.props.navigator.replace({
        component: SecondPage,
        name: 'SecondPage'
      })
    }
  </code></pre>
  
  <p>Then in my SecondPage.js, it just renders the component  in a . And in my ThirdPage.js:</p>
  
  <pre><code>  _rowPressed(){
      this.props.navigator.push({
        component: FourthPage,
        name: 'FourthPage',
      })
    }
  
  
    &lt;TouchableHighlight
      onPress={() =&gt; this._rowPressed()}
    &gt;
       &lt;View&gt;
            &lt;Text&gt;Go to FourthPage&lt;/Text&gt;
       &lt;/View&gt;
    &lt;/TouchableHighlight&gt;
  </code></pre>
  
  <p>Then in my FourthPage.js, I simply have: </p>
  
  <pre><code>  &lt;View style={styles.container}&gt;
      This is FourthPage.js
    &lt;/View&gt;
  </code></pre>
  
  <p>I am getting the error from the ThirdPage.js, which says:</p>
  
  <pre><code>Cannot read property 'push' of undefined in _rowPressed()
  </code></pre>
  
  <p>and I cannot seem to figure out why, because the this.props.navigator.push worked fine for both .replace and .push, but now I am getting this error. Any guidance or insight would be appreciated. Thank you in advance.</p>