React Native: How to reference current route in Navigator's navigationBar={}?
<p>Depending on which current route, I am trying to change up styles like the following, but getting an error: 'route is not defined'. How can I go about referencing the current route: route.name in the navigationBar={}?</p>

<pre><code>&lt;Navigator
 configureScene={...}
 initialRoute={...}
 renderScene={...}
navigationBar={&lt;Navigator.NavigationBar style={route.name == 'Home' ? styles.homeNavBar : styles.normalNavBar} .../&gt;}
/&gt;
</code></pre>

<p><strong>UPDATE</strong></p>

<p>Here is my current set up in <code>index.ios.js</code>:</p>

<pre><code>class practice extends Component {
  constructor(){
    super()
  }

  renderScene(route, navigator){
    return (
        &lt;route.component navigator={navigator} {...route.passProps}/&gt;
    )
  }

  configureScene(route, routeStack) {...}

  render() {
    return (
        &lt;Navigator
          configureScene={this.configureScene}
          initialRoute={{name: 'Login', component: Login}}
          renderScene={(route, navigator) =&gt; this.renderScene(route, navigator)}
          style={styles.container}
          navigationBar={
            &lt;Navigator.NavigationBar
              style={route.name == 'Home' ? styles.homeNavBar : styles.normalNavBar} //This is what I am trying to achieve
              routeMapper={NavigationBarRouteMapper}
            /&gt;
          }
        /&gt;
    );
  }
}
</code></pre>

<p><strong>UPDATE</strong></p>

<pre><code>class practice_style extends Component{

  renderScene(route, navigator){
    this._navigator = navigator

    return (
        &lt;route.component navigator={navigator} {...route.passProps}/&gt;
    )
  }

  configureScene(route, routeStack) {...}

  getNav = () =&gt; {
    return this._navigator
  }

  render() {
    const routes = this.navigator.getCurrentRoutes();
    route = routes[routes.length-1];

    return (
        &lt;Navigator
          configureScene={this.configureScene}
          initialRoute={{name: 'Home', component: Home}}
          renderScene={(route, navigator) =&gt; this.renderScene(route, navigator)}
          style={styles.container}
          navigationBar={
            &lt;Navigator.NavigationBar
              style={route.name == 'Home' ? styles.homeNavBar : styles.normalNavBar}
              routeMapper={NavigationBarRouteMapper}
            /&gt;
          }
        /&gt;
        )
    }
}
</code></pre>