title: How to find current screen/route in nested Tab.Navigator
body: <p>I have a custom TabBar for a Tab.Navigator that needs to have a different action when one of the tabs is selected based on what the current route is in the Stack Navigator component for that tab.</p>
  <p>How can I inspect the currently displayed Stack.Screen inside of this custom TabBar? Trying to use the getRoute hook only shows me the parent screen that hosts that Tab.Navigator.</p>
  <pre><code>&lt;Tab.Navigator tabBar={(props) =&gt; &lt;BottomTabBar {...props} /&gt;}&gt;
        &lt;Tab.Screen
          name=&quot;Home&quot;
          component={HomeStack}
          initialParams={{showSuccess: route.params?.showSuccess}}
        /&gt;
        &lt;Tab.Screen name=&quot;Alternate&quot; component={AlternateScreen} /&gt;
      &lt;/Tab.Navigator&gt;
  </code></pre>
  <p>I can't pass the value in using tabBarOptions as I don't know what the selected route would be when the tab bar is created.</p>