title: How to set initial tab in react navigation TabNavigator dynamically
body: <p>I am using <code>react-navigation</code> and have a nested <code>TabNavigator</code> inside a <code>StackNavigator</code>. I have three tabs in <code>TabNavigator</code> and need to set <code>initialRouteName</code> for <code>TabNavigator</code> dynamically based on some logic.</p>
  
  <p>I have tried putting the <code>TabNavigator</code> inside a <code>React</code> Component with dynamically selected initial tab and used in <code>StackNavigator</code> with passing props through <code>screenProps</code> of <code>TabNavigator</code>. But this way I am unable to navigate to any route of <code>StackNavigator</code>.</p>
  
  <p>Is there any way to make <code>initialRouteName</code> dynamically. </p>
  
  <p>Note: I am not using redux for this application.</p>