title: React-Native <Navigator/> : How do I control it from the class that instantiated it
body: <p>I have a  instantiated in my index.ios.js file like this:</p>
  
  <pre><code>render() {
      return(
        &lt;Navigator
          style={styles.navigator}
          renderScene={this.renderScene}
          initialRoute={{
            component: test,
            navigationBar: &lt;NavigationBar title="home" /&gt;
          }}/&gt;
      );
  }
  </code></pre>
  
  <p>From this same file I have a function that I would like to be able to trigger an action on the navigator e.g.</p>
  
  <pre><code>resetStack(){
    // navigator.popToTop();
  }
  </code></pre>
  
  <p>How do I achieve this? I thought I had to use something called refs and have tried adding a reference as follows:</p>
  
  <pre><code>render() {
      return(
        &lt;Navigator
          ref="ref1"
          style={styles.navigator}
          renderScene={this.renderScene}
          initialRoute={{
            component: test,
            navigationBar: &lt;NavigationBar title="home" /&gt;
          }}/&gt;
      );
  }
  </code></pre>
  
  <p>then calling this with:
      resetStack(){
        // navigator.popToTop();
        ref1.popToTop();
      }</p>
  
  <p>But this results in an error:
  Can't find variable ref1</p>
  
  <p>How do I achieve this? How do I trigger methods in child components?</p>